I am creating a very simple condition in Strategy Builder to exit my Short position:
Default input[0]>(Position.AveragePrice*StopLossFactor); where StopLossFactor is a User Input and I have it set at 1.01
Despite this condition, my strategy exits at some random number. I tried to troubleshoot by isolating a period of time in question. I then made the strategy put Fixed String on the chart to see if any of the variables mismatch.
When Set 1 (entry into position) executes, I get the following string printed on the screen: "121.52-123.9504-130.25" that can be read as "Average Posiition Price = 121.52, Average Position Price * StopLossFactor = 123.95; Close Price = 130.25". The latter doesn't make sense since Price close on that bar is way below 122.00.
I also make sure that when I have a position, Set 1 doen'st get executed again by using a Boolean on position open and position close.
Thanks a bunch!
Comment