Apply stop in different scenarios have different results

Hi all,
Can anybody explain my paradox ? I am using two scenarios of code. They are different only in 1a) sell = 0 2a) applystop( 0,2 , loss, 1), applystop( 1,2 , profit, 1) and 1b) sell = loss or profit; 2) do not use applystop. Have a different results …
Thanks,
Maury

@maury314, without the code it is virtually impossible to tell...

My Guess is that the "stop" you reference in 1b is being used differently. Is stop supposed to by a logical (true/false) or a value. Since we can't see what you are assigning to loss or profit, we don't really know. We might assume that because you have an "or" statement that both are logical values, but we can't know.

You have been around long enough, you should know the standard - Debug your formula links...

2 Likes

Just thought of another potential reason...

Assuming you are using End of Day trading, your applystop might trigger during the day, while your loss or profit variables in the 1b scenario may trigger at a different price level due to your trade delays.

Again, Guessing, as we don't know your code or really any other details.

1 Like