Forums › ProRealTime English forum › ProOrder support › oil-10min-hammernegated-pattern-strategy › Reply To: oil-10min-hammernegated-pattern-strategy
07/13/2017 at 8:18 PM
#40586
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
//TRAILING STOP TGL =18 TGS= 24 if not onmarket then MAXPRICE = 0 MINPRICE = close PRICEEXIT = 0 ENDIF if longonmarket then MAXPRICE = MAX(MAXPRICE,close) if MAXPRICE-tradeprice(1)>=TGL*pointsize then PRICEEXIT = MAXPRICE-TGL*pointsize ENDIF ENDIF if shortonmarket then MINPRICE = MIN(MINPRICE,close) if tradeprice(1)-MINPRICE>=TGS*pointsize then PRICEEXIT = MINPRICE+TGS*pointsize ENDIF ENDIF if onmarket and PRICEEXIT>0 then EXITSHORT AT PRICEEXIT STOP SELL AT PRICEEXIT STOP ENDIF |
Hi
Being new to coding, Am I correct in thinking that there is no stop if the price moves immediately against any new trade position? (either long or short).
Also i’d be interested in hear how you decided on TGL = 18 and TGS = 24 ?
Many thanks