Print(string.Format("Price={0} StopPrice={1}", Close[0], StopPrice))
What function gets called everytime the stop moves (ie. the trailing stop moves) or the price moves? I.e where do I put the above line of code so that I can see every determination/update of the value of the stop price?
This would be extremely useful for debugging what is going on with my stops as they do not appear to be doing what I think they should be.
The thing I am trying to determine is what happens if I use SetTrailStop(stopPips) in OnBarUpdate every single bar?
Say we are long and that the price has moved down and therefore the stop price has stayed where it is. Does the next call to SetTrailStop(stopPips) move the stop down, or does it leave it alone?
Comment