Set a stop loss x% from the average position price.
Note: the % loss is calculated and placed individually for each order with IG or PRT-CFD.
SET STOP %LOSS x
myMACD = MACD[12,26,9](close)
long = myMACD crosses over 0
IF NOT LongOnMarket AND long THEN
BUY 1 CONTRACTS AT MARKET
//set stop loss at 2% from the average position price
SET STOP %LOSS 2