I want to make rules based on the Open price, and buy or sell that day if the criteria are met.
Here are the rules I'm using:
Buy:(lag(open, 0))<=30.0 Sell:(lag(open, 0))>30.0
I'd like to buy or sell the same day (at the open), as if I had a GTC order. Instead, the transaction is happening the day after the rule is triggered.
Thanks in advance for any suggestions.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to make rules based on the Open price, and buy or sell that day if the criteria are met.
Here are the rules I'm using:
Buy:(lag(open, 0))<=30.0 Sell:(lag(open, 0))>30.0
I'd like to buy or sell the same day (at the open), as if I had a GTC order. Instead, the transaction is happening the day after the rule is triggered.
Thanks in advance for any suggestions.
Example, in paper trade or other analysis methods in "Trade Value" try to select "Sell Trade Value" as "Today Close"...
Best Regards