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.
-
-
03/31/2020 at 10:06 PM #12417603/31/2020 at 10:29 PM #124180Here is the Mother of dragons V1 strategy on my real account. mini DAX for 1 contract.I stopped the strategy to optimize it. It is imperative that the strategy cuts at 11:00 p.m. – midnight. For example, last night a position was opened on the DAX to play the performance of WALL STREET. From midnight profit taking and correction …The trade ends up losing at the exit.Breakeven and stoploss must be adapted according to the position period.– Between 12:15 am and 7:00 am– Between 08:00 and 12:00.– Between 12:00 p.m. and 3:30 p.m.– Between 3.30 p.m. and 7 p.m.-Between 7:00 p.m. and 11:45 p.m.EXIT 11:45 PMI work on the strategy in this directionFlorian04/01/2020 at 10:07 AM #12421704/01/2020 at 10:26 AM #12421904/01/2020 at 11:31 AM #12422704/06/2020 at 6:39 PM #124921
for the moment your strategy is very perfect and seems to me really robust for different markets, greetings ! well done
1 user thanked author for this post.
04/06/2020 at 7:20 PM #124925imperative that the strategy cuts at 11:00 p.m
Hi Florian, I came to the same conclusion. But are you running DAX v1? v2 is much improved, including time limit 00 – 23
04/08/2020 at 9:52 AM #125176Hi,
First of all. Thank you @nonetheless for sharing, and everyoneelse helping out.
Anyone testing this live right now? Did you get any positions yesterday or today on dax – v.2 and dow – v.4? Just want to know if i did anything wrong. It works on the backtest..
04/08/2020 at 11:07 AM #125189Hi Linus, in the past couple of days (Apr 6, 7) i’ve had 7 trades on the DOW and 4 on the DAX, all wins.
2 users thanked author for this post.
04/08/2020 at 11:14 AM #125198Thanks for the info @nonetheless , Any clue why it does not take a poss?
(Just do doublecheck, was the last trade on dow : 23:15 6 and closed 02:40 7 april Or anyone more then that?Elso there is the code:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162// Definition of code parametersDEFPARAM CumulateOrders = false // Cumulating positions deactivatedDEFPARAM preloadbars = 5000//Money Management DOWMM = 1 // = 0 for optimizationif MM = 0 thenpositionsize=1ENDIFif MM = 1 thenONCE startpositionsize = .4ONCE factor = 10 // factor of 10 means margin will increase/decrease @ 10% of strategy profit; factor 20 = 5% etcONCE factor2 = 20 // tier 2 factorONCE margin = (close*.05) // tier 1 margin value of 1 contract in instrument currency; change decimal according to available leverageONCE margin2 = (close*.01)// tier 2 margin value of 1 contract in instrument currency; change decimal according to available leverageONCE tier1 = 55 // DOW €1 IG first tier margin limitONCE maxpositionsize = 550 // DOW €1 IG tier 2 margin limitONCE minpositionsize = .2 // enter minimum position allowedIF Not OnMarket THENpositionsize = startpositionsize + Strategyprofit/(factor*margin)ENDIFIF Not OnMarket THENIF startpositionsize + Strategyprofit/(factor*margin) > tier1 thenpositionsize = (((startpositionsize + (Strategyprofit/(factor*margin))-tier1)*(factor*margin))/(factor2*margin2)) + tier1 //incorporating tier 2 marginENDIFIF Not OnMarket THENif startpositionsize + Strategyprofit/(factor*margin) < minpositionsize THENpositionsize = minpositionsize //keeps positionsize from going below allowed minimumENDIFIF (((startpositionsize + (Strategyprofit/(factor*margin))-tier1)*(factor*margin))/(factor2*margin2)) + tier1 > maxpositionsize thenpositionsize = maxpositionsize// keeps positionsize from going above IG tier 2 margin limitENDIFENDIFENDIFENDIFTIMEFRAME(2 hours,updateonclose)Periodh= 515inner = 2*weightedaverage[round( Periodh/2)](typicalprice)-weightedaverage[Periodh](typicalprice)HULL = weightedaverage[round(sqrt(Periodh))](inner)cnd1 = HULL > HULL[1]cnd2 = HULL < HULL[1]indicator1 = SuperTrend[6,10]cnd3 = (close > indicator1)cnd4 = (close < indicator1)indicator4 = CALL "Moving Average Slope"[55,3](close)cnd5 = (indicator4 > 0)cnd6 = (indicator4 < 0)//PRC_Stochastic RSI | indicatorlengthRSI = 16 //RSI periodlengthStoch = 10 //Stochastic periodsmoothK = 11 //Smooth signal of stochastic RSIsmoothD = 3 //Smooth signal of smoothed stochastic RSImyRSI = RSI[lengthRSI](close)MinRSI = lowest[lengthStoch](myrsi)MaxRSI = highest[lengthStoch](myrsi)StochRSI = (myRSI-MinRSI) / (MaxRSI-MinRSI)Ka = average[smoothK](stochrsi)*100Da = average[smoothD](Ka)cnd7 = Ka>Dacnd8 = Ka<DaTIMEFRAME(15 minutes,updateonclose)indicator2 = Average[4](typicalPrice)indicator3 = Average[8](typicalPrice)cnd9 = (indicator2 > indicator3)cnd10 = (indicator2 < indicator3)Period2h= 23inner2 = 2*weightedaverage[round( Period2h/2)](typicalprice)-weightedaverage[Period2h](typicalprice)HULL2 = weightedaverage[round(sqrt(Period2h))](inner2)cnd11 = HULL2 > HULL2[1]cnd12 = HULL2 < HULL2[1]indicator5 = CALL "Moving Average Slope"[20,2](close)cnd13 = (indicator5 > 0)cnd14 = (indicator5 < 0)TIMEFRAME(5 minutes)Period3= 15inner3 = 2*weightedaverage[round( Period3/2)](typicalprice)-weightedaverage[Period3](typicalprice)HULL3 = weightedaverage[round(sqrt(Period3))](inner3)cnd15 = HULL3 > HULL3[1]and HULL3[1]<HULL3[2]cnd16 = HULL3 < HULL3[1]and HULL3[1]>HULL3[2]// Conditions to enter long positionsIF cnd1 AND cnd3 AND cnd5 and cnd7 and cnd9 and cnd11 and cnd13 and cnd15 THENBUY positionsize CONTRACT AT MARKETENDIF// Conditions to enter short positionsIF cnd2 AND cnd4 AND cnd6 and cnd8 and cnd10 and cnd12 and cnd14 and cnd16 THENSELLSHORT positionsize CONTRACT AT MARKETENDIFSET STOP %LOSS 2.2SET TARGET %PROFIT 2.1//================== exit in profitif longonmarket and cnd16 and cnd10 and close>positionprice thensell at marketendifIf shortonmarket and cnd15 and cnd9 and close<positionprice thenexitshort at marketendif//==============exit at lossif longonmarket AND cnd2 and cnd16 and close<positionprice thensell at marketendifIf shortonmarket and cnd1 and cnd15 and close>positionprice thenexitshort at marketendif//trailing stop functiontrailingPercent = .26if onmarket thentrailingstart = tradeprice(1)*(trailingpercent/100) //trailing will start @trailinstart points profittrailingstep = 3 //trailing step to move the "stoploss"endif//reset the stoploss valueIF NOT ONMARKET THENnewSL=0ENDIF//manage long positionsIF LONGONMARKET THEN//first move (breakeven)IF newSL=0 AND close-tradeprice(1)>=trailingstart THENnewSL = tradeprice(1)+trailingstepENDIF//next movesIF newSL>0 AND close-newSL>trailingstep THENnewSL = newSL+trailingstepENDIFENDIF//manage short positionsIF SHORTONMARKET THEN//first move (breakeven)IF newSL=0 AND tradeprice(1)-close>=trailingstart THENnewSL = tradeprice(1)-trailingstepENDIF//next movesIF newSL>0 AND newSL-close>trailingstep THENnewSL = newSL-trailingstepENDIFENDIF//stop order to exit the positionsIF newSL>0 THENSELL AT newSL STOPEXITSHORT AT newSL STOPENDIF//************************************************************************04/08/2020 at 11:25 AM #125200hello Nonetheless, which version you work with please?
04/08/2020 at 12:23 PM #125210@Linus, I’m running a slightly different version so I didn’t get that trade. Note, if you’re going to use the MM you have to change the details in lines 13,14,15,16. See the market info tab to find the max position for each tier and the leverage (convert the % to a decimal).
@bertrandpinoy attached is the latest version, but changes are fairly minor.
6 users thanked author for this post.
04/08/2020 at 1:15 PM #125222As always, thank you @nonetheless !
Did you apply theses minor changes to the DAX et SP versions ?
04/08/2020 at 1:22 PM #125223@ArnoldB no, they’re all built slightly differently so no changes to DAX v2 or SP v2
04/09/2020 at 12:05 PM #125398Tant de français ici … but no one wants to code for the CAC40 ? (could it be something in the name? In any European language ‘CAC’ sounds … well, uninspiring to say the least).
Never mind. Here’s an offer to redress the balance.
-
AuthorPosts
Find exclusive trading pro-tools on