I'm having trouble debugging this piece of code. When I run this code in strategy analyzer (GBPCHF as the instrument), for some reason, when I take short trades the stop loss and profit targets are not placed. When I take long trades, the stop loss is placed but not the target. Can anyone find what is causing this?
Thanks.

Comment