Mother of Dragons trading strategy…
Forums › ProRealTime English forum › ProOrder support › Mother of Dragons trading strategy…
- This topic has 522 replies, 50 voices, and was last updated 3 years ago by LaurentBZH35.
-
-
02/12/2020 at 11:36 PM #119504
New Money Management, increases position size by 1 for each 1000 profit, margin is constant at ~13% of funds.
Insane result, not for the faint hearted…
02/13/2020 at 1:00 AM #119511Correction: due to tiered margins, to keep the requirement at a constant % of funds, position size would have to peak at 55. Slightly less insane and probably better that way.
03/02/2020 at 12:14 AM #120913New improved recipe, now with added vitamins.
Long and short in one code or separated. Robustness tests for v3.5L and 3.5S are roughly similar as v3.3 – the long is a bit worse, the short is a bit better. WF is fine but I’ve only got 100k to work with so it could still be the mother of all curve-fits.
Most grateful if someone could run it on 200k to see if it doesn’t completely crash and burn.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147// Definition of code parametersDEFPARAM CumulateOrders = false // Cumulating positions deactivatedDEFPARAM preloadbars = 5000//Money ManagementMM = 0if MM = 0 then //MM = 0 for optimizationpositionsize=1ENDIFif MM = 1 thenONCE startpositionsize = .4ONCE factor = 10 // factor of 15 means margin increases/decreases @ 6.6% of strategy profit; 10 = 10% 20 = 5% etc — optimize for best result, profit vs drawdownONCE margin = (close*.005) // margin value of 1 contract in instrument currencyONCE maxpositionsize = 55 // DOW €1 IG first tier margin limitONCE minpositionsize = .2 // enter minimum position allowedIF Not OnMarket THENpositionsize = startpositionsize + Strategyprofit/(factor*margin)ENDIFIF Not OnMarket THENif startpositionsize + Strategyprofit/(factor*margin) < minpositionsize THENpositionsize = minpositionsize// keeps positionsize from going below allowed minimumENDIFIF startpositionsize + Strategyprofit/(factor*margin) > maxpositionsize thenpositionsize = maxpositionsize// keeps positionsize from going above IG first tier margin limitENDIFENDIFENDIFTIMEFRAME(2 hours,updateonclose)Period= 490inner = 2*weightedaverage[round( Period/2)](typicalprice)-weightedaverage[Period](typicalprice)HULL = weightedaverage[round(sqrt(Period))](inner)c1 = HULL > HULL[1]c2 = HULL < HULL[1]indicator1 = SuperTrend[5,22]c3 = (close > indicator1)c4 = (close < indicator1)indicator4 = CALL "Moving Average Slope"[52,1](close)c11 = (indicator4 > 0)c12 = (indicator4 < 0)//PRC_Stochastic RSI | indicatorlengthRSI = 12 //RSI periodlengthStoch = 9 //Stochastic periodsmoothK = 11 //Smooth signal of stochastic RSIsmoothD = 4 //Smooth signal of smoothed stochastic RSImyRSI = RSI[lengthRSI](close)MinRSI = lowest[lengthStoch](myrsi)MaxRSI = highest[lengthStoch](myrsi)StochRSI = (myRSI-MinRSI) / (MaxRSI-MinRSI)K = average[smoothK](stochrsi)*100D = average[smoothD](K)c13 = K>Dc14 = K<DTIMEFRAME(15 minutes,updateonclose)indicator2 = Average[5](typicalPrice)indicator3 = Average[7](typicalPrice)c7 = (indicator2 > indicator3)c8 = (indicator2 < indicator3)Period2= 19inner2 = 2*weightedaverage[round( Period2/2)](typicalprice)-weightedaverage[Period2](typicalprice)HULL2 = weightedaverage[round(sqrt(Period2))](inner2)c9 = HULL2 > HULL2[1]c10 = HULL2 < HULL2[1]TIMEFRAME(5 minutes)Period3= 15inner3 = 2*weightedaverage[round( Period3/2)](typicalprice)-weightedaverage[Period3](typicalprice)HULL3 = weightedaverage[round(sqrt(Period3))](inner3)c5 = HULL3 > HULL3[1]and HULL3[1]<HULL3[2]c6 = HULL3 < HULL3[1]and HULL3[1]>HULL3[2]// Conditions to enter long positionsIF c1 AND C3 AND C5 and c7 and c9 and c11 and c13 THENBUY positionsize CONTRACT AT MARKETENDIF// Conditions to enter short positionsIF c2 AND C4 AND C6 and c8 and c10 and c12 and c14 THENSELLSHORT positionsize CONTRACT AT MARKETENDIFSET STOP %LOSS 2.3SET TARGET %PROFIT 1.7//================== maximise les gains ==========if longonmarket and C6 and c8 and close>positionprice thensell at marketendifIf shortonmarket and C5 and c7 and close<positionprice thenexitshort at marketendif//==============limite les pertesif longonmarket AND c2 and c6 and close<positionprice thensell at marketendifIf shortonmarket and c1 and c5 and close>positionprice thenexitshort at marketendif//trailing stop functiontrailingstart = 35 //trailing will start @trailinstart points profittrailingstep = 3 //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//************************************************************************03/02/2020 at 9:52 AM #12093303/02/2020 at 10:30 AM #120938Thanks for that @Zigo. The OOS is not disastrous but with a 94% win rate it should make more money. The curve doesn’t really get going until late 2018, ie my optimization.
Might be better with the moving average slope, which is here if you’re interested:
https://www.prorealcode.com/prorealtime-indicators/moving-average-slope/
03/02/2020 at 12:10 PM #120948In order for the screenshots: 3.3, 3.5L,3.5S on 200k.
I think only 3.3 is acceptable in terms of OOS (also if the initial flat curve is synonymous of an high optimization on 100k as you said); but i tried a robustness test on it (results in attached) and it is not bad! I think it’s worth trying on demo for the next month.
03/02/2020 at 1:57 PM #120961Thanks Francesco — agree that it’s ‘not too bad’ but obviously I was hoping for a better curve. The long and short results are apparently with MM, so a bit misleading, but at least it’s not a bust. At this stage a bit of forward testing is the only thing for it. Thanks again.
03/02/2020 at 2:08 PM #12096203/02/2020 at 2:33 PM #120965Problem is, there’s so many of them! — probably too many. My guess is that the exit variables — stop loss, target profit, trailing stop and step, might have a bigger effect than the entry variables. I’d try those first.
03/02/2020 at 4:24 PM #120981Tried to work on exit variables but nothing changed. I think the “problem” is on the entry ones, but they are too many as you said 🙁
1 user thanked author for this post.
03/02/2020 at 5:02 PM #120992Not to worry, I’ll leave it on Demo for a while, see what happens…
03/22/2020 at 1:58 PM #122905Hi…
Bearish and bullish MOD work perfectly.
I have modified them a little, they are incredible.
I would to Contact you vía email… I am sure they are not the only jewelry You have.
Im gain 7600 pips in Dow Jones in one month.
And im gain 1600 pips in dax un one month with muy versión of Vectorial Dax.
Thanks!!!
03/22/2020 at 2:27 PM #122910Hi Fran55, good to know it’s working for you. Here’s a couple of others I finally got around to for the DAX and SP (US500) — collect the whole set.
I haven’t forward tested either of them yet so let us know how you get on. Money Management is optional.
03/22/2020 at 6:46 PM #122942Really good strategy, great work @nonetheless and thanks to everyone else who contributed with good codes for MM, TS etc!
03/23/2020 at 2:36 PM #123003@nonetheless : DAX-5m-Mother.of_.Dragons-v1.itf with 200K candles, spread 2.6, MM=0
-
AuthorPosts
Find exclusive trading pro-tools on