Raghee Horner Grab Candles Adjustments
Forums › ProRealTime English forum › ProBuilder support › Raghee Horner Grab Candles Adjustments
- This topic has 6 replies, 3 voices, and was last updated 1 year ago by JS.
-
-
03/25/2023 at 10:47 AM #212089
Hello everyone,
I have worked on an indicator to make it more accurate and added the evaluation of market volatility using the Average True Range (ATR). I made some changes to the indicator code which can be found at this link: https://www.prorealcode.com/prorealtime-indicators/raghee-horner-grab-candles/.
I would like to compare my new indicator with the original one to evaluate the effectiveness of my changes and get your feedback based on your experience.
Thank you in advance for your comments.
Edo
12345678910111213141516a = ExponentialAverage[34](High)b = ExponentialAverage[34](Low)c = AverageTrueRange[14](Close)if Close > a + c / 2 ThenDRAWCANDLE(Open, High, Low, Close)COLOURED(0,255,0)ELSIF Close < b - c / 2 ThenDRAWCANDLE(Open, High, Low, Close)COLOURED(255,0,0)elseDRAWCANDLE(Open, High, Low, Close)COLOURED(0,0,255)endifRETURN03/25/2023 at 11:08 AM #212090It doesn’t look much different; it seems that green and red candle sequences are a little be more fragmented sometimes.
The most effective way is to have the same strategy coded for both of them, then comparing the results.
1 user thanked author for this post.
03/25/2023 at 12:11 PM #212096Hi,
What do you mean by “effectiveness”…?
More profit or a better win percentage, lower drawdown or more robust… etc…?
What is your main goal…?
What you’re doing now is putting an extra band, of half an ATR, around the original band…
As a result, the number of trades will decrease and (probably) also the profit…
03/25/2023 at 3:26 PM #21210603/25/2023 at 4:22 PM #212107Hi Edo,
I compared the two systems and as expected the number of trades has decreased but the % win trades have increased from 62% to 67%…
The profit has also decreased, but with a good MM system that can be absorbed…
In general, I think that the modified system is less stable partly because another variable has been added which must probably be optimized…
I have expanded the original system with a simple MM system and the profit has increased from 14,000 to 151,000…
03/26/2023 at 9:08 AM #212124Hi JS,
Thank you very much for this in-depth analysis and for sharing statistics and reasoning. I have a question: how did you integrate my new indicator into the strategy to make a comparison between systems? Would you be able to share the code?
Thank you in advance. Have a nice Sunday.
Edo
03/26/2023 at 9:35 AM #212126Hi Edo,
Hereby the custom code…
Raghee Horner Grab System V1.112345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061DefParam CumulateOrders = FalseOnce EMAPeriod = 26Once ADXPeriod = 6Once ATRPeriod = 14Once TStart = 20 //Trailing StartOnce TStep = 2 //Trailing Stepa=exponentialaverage [EMAPeriod] (high) //Upper Grabb=exponentialaverage [EMAPeriod] (low) //Lower Grabc=AverageTrueRange[ATRPeriod](close)d=ADX[ADXPeriod] //Average Directional IndexIf Close > a+c/2 and Close[1] < a+c/2 and d > 25 then //Start UpTrend and ADX>25Buy 1 contract at MarketEndIfif Close < b-c/2 and Close[1] > b-c/2 and d > 25 then //Start DownTrend and ADX>25SellShort 1 contract at MarketEndIf//************************************************************************//trailing stop functiontrailingstart = TStart //trailing will start @trailinstart points profittrailingstep = TStep //trailing step to move the "stoploss"//reset the stoploss valueIF NOT ONMARKET THENnewSL=0ENDIF//manage long positionsIF LONGONMARKET THEN//first move (breakeven)IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THENnewSL = tradeprice(1)+trailingstep*pipsizeENDIF//next movesIF newSL>0 AND close-newSL>=trailingstep*pipsize THENnewSL = newSL+trailingstep*pipsizeENDIFENDIF//manage short positionsIF SHORTONMARKET THEN//first move (breakeven)IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THENnewSL = tradeprice(1)-trailingstep*pipsizeENDIF//next movesIF newSL>0 AND newSL-close>=trailingstep*pipsize THENnewSL = newSL-trailingstep*pipsizeENDIFENDIF//stop order to exit the positionsIF newSL>0 THENSELL AT newSL STOPEXITSHORT AT newSL STOPENDIF//************************************************************************ -
AuthorPosts
Find exclusive trading pro-tools on