Hello,
For daytrading , how to implement a code to ignore first trading signal of the day.
I close all positions at the end of the day. But want to ignore the first trading signal, next day.
I can do it manually, i.e ignore the first trade signal, but for backtesting and auto-trading purposes, I was wondering if it is possible to code this.
Thanks,
Sofia
Size:
Color:
One way would be to initialize a counter to 0 on the first bar of the day, increment the counter when signals occur, and test that it is greater than 1 before taking action, exampleÑ
CODE:
Please log in to see this code.
Size:
Color:
Thanks.
Sofia
Size:
Color: