Changes to Weekly Reversal FX Strategy
- This topic has 2 replies, 2 voices, and was last updated 2 years ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
Similar topics:
Forums › ProRealTime English forum › ProOrder support › Changes to Weekly Reversal FX Strategy
Hi,
I’m looking for a few modifications to the attached strategy:
Existing Strategy notes:
Trade On Conditions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
defparam cumulateorders=false defparam preloadbars=0 // --- settings LotSize = 1 //define lot size of each order here // --- end of settings sellc, buyc, entry, sl, tp, dir = CALL "PRC_PatrickHilley01_indi"(close) if onmarket or shorttriggered or longtriggered then currentry=entrylevel endif if buyc[0] or sellc[0] then entrylevel=entry stoploss=sl takeprofit=tp direction=dir endif if Not Onmarket AND (Time >= 080000 AND Time[1] < 080000) AND (DayOfWeek = 1) THEN entrylevel=0 endif if Onmarket AND (Time >= 080000 AND Time[1] < 080000) AND (DayOfWeek = 2) THEN set stop BreakEven endif if entrylevel>0 then if not longonmarket and entrylevel<>currentry and close<entrylevel and direction=1 then buy lotsize contract at entrylevel stop set stop price stoploss set target price takeprofit endif if not shortonmarket and entrylevel<>currentry and close>entrylevel and direction=-1 then sellshort lotsize contract at entrylevel stop set stop price stoploss set target price takeprofit endif endif |
Thanks Robert,
Please see below for the last point that I need some assistance with:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
tolerence = 0.01 s0 = opendayofweek=5 s1 = range > 0.007 s2 = high=highest[5](high) s3 = rsi[14]>=65 s4 = high > BollingerUp[20](close) * (1 - tolerence) sellc = s0 and s1 and s2 and s3 and s4 if sellc then drawarrowdown(barindex,high) coloured("red") entry = close-(0.001*close) sldistance=0.002*close stoploss = close+sldistance takeprofit = close-sldistance*5 direction = -1 endif // --- b0 = opendayofweek=5 b1 = range > 0.007 b2 = low=lowest[5](low) b3 = rsi[14]<=35 b4 = low > Bollingerdown[20](close) * (1 - tolerence) buyc = b0 and b1 and b2 and b3 and b4 if buyc then drawarrowup(barindex,low) coloured("green") entry = close+(0.001*close) sldistance=0.002*close stoploss = entry-sldistance takeprofit = entry+sldistance*5 direction = 1 endif return sellc as "sell conditions" coloured(0,0,0,0), buyc as "buy conditions" coloured(0,0,0,0), entry as "entry", stoploss as "stoploss" coloured("red"), takeprofit as "takeprofit" coloured("green"), direction as "direction" coloured(0,0,0,0) |
Find exclusive trading pro-tools on