3 Candle Strategy
Forums › ProRealTime English forum › ProOrder support › 3 Candle Strategy
- This topic has 82 replies, 6 voices, and was last updated 4 years ago by Regan2020.
-
-
08/03/2018 at 4:45 PM #7749108/06/2018 at 12:11 PM #77628
Good Day to you,
I think that code is now correct. can someone prrof this according to the systemrules? I think there could be an issue with SL and TP.
Thank you Marc
12345678910111213141516171819202122232425262728293031DEFPARAM CumulateOrders = false//Buy-Condition l1 Exapmle (For daily): Candle from monday is bullish and followed by 2 candles with lower highs and lower lows. Close of current candle (wednesday-candle) is higher than close of monday candlel1 = OPEN[2] < CLOSE[2] AND High[2] > High [1] AND High[1] > High AND Low[2] > Low[1] AND Low[1] > Low AND Close > Close[2]//Buy-Condition l2 Exapmle (For daily): Candle of monday is bearish and followed by 2 candles with lower highs and lower lows. Close of current candle (wednesday-candle) is higher than open of monday candlel2 = OPEN[2] > CLOSE[2] AND High[2] > High [1] AND High[1] > High AND Low[2] > Low[1] AND Low[1] > Low AND Close > Open[2]//Sell-Condition s1 Exapmle (For daily): Candle of monday is bullish and followed by 2 candles with higher highs and higher lows. Close of current candle (wednesday-candle) is lower than close of monday candles1 = OPEN[2] < CLOSE[2] AND High[2] < High [1] AND High[1] < High AND Low[2] < Low[1] AND Low[1] < Low AND Close < Close[2]//Sell-Condition s2 Exapmle (For daily): Candle of monday is bearish and followed by 2 candles with higher highs and higher lows. Close of current candle (wednesday-candle) is lower than open of monday candles2 =OPEN[2] > CLOSE[2] AND High[2] < High [1] AND High[1] < High AND Low[2] < Low[1] AND Low[1] < Low AND Close < Close[2]//Buy @ open of nextcandle if condition l1 or l2 is metIF l1 OR l2 AND Not OnMarket THEN //Not OnMarket will prevent SL & TP to be recalculatedSL = (open - low[1]) //difference between current price and LOW of candle 1TP = (high[2] - open) //difference between the HIGH of candle 2 and current price (a lower current price is assumed)BUY 1 SHARES AT MARKET //MarketOrderSET STOP LOSS SLSET TARGET PROFIT TPENDIF//Sell @ open of nextcandle if condition s1 or s2 is metIF s1 OR s2 AND Not OnMarket THEN //Not OnMarket will prevent SL & TP to be recalculatedSL = (high[1] - open) //difference between current price and HIGH of candle 1TP = (open - low[2]) //difference between the LOW of candle 2 and current price (a higher current price is assumed)SELLSHORT 1 SHARE AT MARKET //MarketOrderSET STOP LOSS SLSET TARGET PROFIT TPENDIF08/06/2018 at 1:36 PM #77632It works, but I cannot tell if it’s working fine, I dod not check the patterns.
I checked SL & TP and sometimes they’re huge, sometimes very close to the minimun requirements!
The main isssue is the very few trades opened, on DAX daily just 3 in 8 years!
It’s for sure good practice to improve your know-how.
1 user thanked author for this post.
08/06/2018 at 3:01 PM #7765008/06/2018 at 3:37 PM #7765408/06/2018 at 3:42 PM #77656Try using ATR, searching this forum will allow you to find many examples about it.
08/08/2018 at 1:34 PM #7776708/08/2018 at 2:24 PM #77774Another example with ATR-based SL and TP calculation
1234567891011121314151617181920212223242526DEFPARAM CumulateOrders = false//Buy-Conditionl1 = OPEN[2] > CLOSE[2] AND OPEN[1] > CLOSE[1] AND High[2] > High [1] AND High[1] > High AND Low[2] > Low[1] AND Low[1] > Low AND Close > Close[2]//Sell-Conditions1 = OPEN[2] < CLOSE[2] AND OPEN[1] < CLOSE[1] AND High[2] < High [1] AND High[1] < High AND Low[2] < Low[1] AND Low[1] < Low AND Close < Close[2]//Buy @ open of nextcandle if condition l1 is metIF l1 AND Not OnMarket THEN //Not OnMarket will prevent SL & TP to be recalculatedSL = TP //difference between current price and LOW of candle 1TP = (AverageTrueRange[x]((open+close+low+high)/4))*2 //difference between the HIGH of candle 2 and current price (a lower current price is assumed)BUY 1 SHARES AT MARKET //MarketOrderSET STOP LOSS SLSET TARGET PROFIT TPENDIF//Sell @ open of nextcandle if condition s1 is metIF s1 AND Not OnMarket THEN //Not OnMarket will prevent SL & TP to be recalculatedSL = TP //difference between current price and HIGH of candle 1TP = (AverageTrueRange[x]((open+close+low+high)/4))*2 //difference between the LOW of candle 2 and current price (a higher current price is assumed)SELLSHORT 1 SHARE AT MARKET //MarketOrderSET STOP LOSS SLSET TARGET PROFIT TPENDIF08/08/2018 at 2:53 PM #77776With more variables
12345678910111213141516171819202122232425262728DEFPARAM CumulateOrders = falseTPL = (AverageTrueRange[TPLATR]((open+close+low+high)/4))*TPLMODSLL = (AverageTrueRange[SLLATR]((open+close+low+high)/4))*SLLMODTPS = (AverageTrueRange[TPSATR]((open+close+low+high)/4))*TPSMODSLS = (AverageTrueRange[SLSATR]((open+close+low+high)/4))*SLSMOD//Buy-Conditionl1 = OPEN[2] > CLOSE[2] AND OPEN[1] > CLOSE[1] AND High[2] > High [1] AND High[1] > High AND Low[2] > Low[1] AND Low[1] > Low AND Close > Close[2]//Sell-Conditions1 = OPEN[2] < CLOSE[2] AND OPEN[1] < CLOSE[1] AND High[2] < High [1] AND High[1] < High AND Low[2] < Low[1] AND Low[1] < Low AND Close < Close[2]//Buy @ open of nextcandle if condition l1 is metIF l1 AND Not OnMarket THENBUY 1 SHARES AT MARKET //MarketOrderSET STOP LOSS SLLSET TARGET PROFIT TPLENDIF//Sell @ open of nextcandle if condition s1 is metIF s1 AND Not OnMarket THENSELLSHORT 1 SHARE AT MARKET //MarketOrderSET STOP LOSS SLSSET TARGET PROFIT TPSENDIF08/08/2018 at 4:17 PM #7779208/08/2018 at 4:28 PM #7779308/08/2018 at 7:56 PM #77804Marc big thank you!
I’ve set it going on Demo Fwd Test as I get attached on 5 min TF on DJI on 100,000 bars!
Bigger drawdown than I like, but if it’s out of money already gained by the System then I can live with that! 🙂 🙂
1 user thanked author for this post.
08/08/2018 at 8:45 PM #77807Draw down has to be accepted as relative to run up or overall profit. As a rule of thumb I like to see at a glance that draw down multiplied by ten is less than run up and overall profit. So for example if draw down is £2000 then I want to see at least £20000 run up or £20000 overall profit. It is not a ‘set in stone’ rule but is an easy way to assess how bad draw down really is by comparison.
1 user thanked author for this post.
08/08/2018 at 9:26 PM #7781108/08/2018 at 9:40 PM #77812 -
AuthorPosts
Find exclusive trading pro-tools on