I'm trying to figure out something while playing with basic stuff.
I have an indicator (it could be anything) but let's say
Now I use the same exact condition to enter a long position. Something like this:
if ((Close[2] < Open[2] & Close[1] < Open[1]))
{
EnterLong("Long");
}
The condition happens (brown arrow) at the same time of the indicator but the order gets placed one bar later (blue arrow). The purple arrow is the exit.
I would like for the order to be placed at the opening of the bar with the white arrow. How do I accomplish it?
Thanks!
Comment