At lines 9 and 13 you should do some math to choose whether LIMIT or STOP should be applied to any pending order, otherwise they could be entered at market.
I guess you are using this strategy not on a FX pair, since line 6 for currencies should be (though it should ALWAYS be, no matter what instrument you are trading):
1
x=1*pipsize
As for your last two lines, I can’t understand thoroughly what they mean, so I’m asking you to better explain your issue.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.