COWABUNGA on Dax with Multiple Time Frames
Forums › ProRealTime English forum › ProOrder support › COWABUNGA on Dax with Multiple Time Frames
- This topic has 20 replies, 7 voices, and was last updated 4 years ago by robertogozzi.
-
-
07/19/2018 at 2:47 PM #76333
There is the strategy, based on https://www.babypips.com/trading/so_youve_finished_the_school_o, I changed:
- 10-minute TF instead of 15
- SL and TP are fixed numbers, instead of being set at a swing price or the like
- added a sort of trailing stop to lock some profits
It seems to perform nicely (june 1st through today), even though I did not go through Walk Forward.
edit: this code is missing TIMEFRAME(default) after line 37, see the correct version (code and ITF file) at
https://www.prorealcode.com/topic/cowabunga-on-dax-with-multiple-time-frames/page/2/#post-147088COWABUNGA on Dax with Multiple Time Frames123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100//************************************************************************// Cowabunga DAX//// https://www.babypips.com/trading/so_youve_finished_the_school_o//************************************************************************//DEFPARAM CumulateOrders = False //Do not cumulate ordersDEFPARAM FlatBefore = 090000 //No Trades before 09:00DEFPARAM FlatAfter = 200000 //No Trades after 21:00DEFPARAM PreLoadBars = 2000////////////////////////////////////////////////////////////////////////TIMEFRAME (10 minutes, updateonclose) //10 minutes instead of 15ONCE nLots = 1ONCE TP = 65 //65ONCE SL = 50 //50ONCE AvgType = 1 //1 = emaONCE FastMA = 5 //5ONCE SlowMA = 10 //10FastMA15m = Average[FastMA,AvgType](close)SlowMA15m = Average[SlowMA,AvgType](close)ONCE StocOS = 25 //25 - 75 OverSold/OverBought tresholdsONCE StocOB = 100 - StocOSStocK15m = Stochastic[10,3](close) //10, 3StocD15m = Average[3](StocK15m) //3ONCE RsiMiddle = 50 //50ONCE RsiP = 9 //9Rsi15m = Rsi[RsiP](close)Macd15m = MACD[12,26,9](close) //12,26,9////////////////////////////////////////////////////////////////////////TIMEFRAME (4 hours, updateonclose) //4 hours (240 minutes)FastMA4h = Average[FastMA,AvgType](close)SlowMA4h = Average[SlowMA,AvgType](close)StocK4h = Stochastic[10,3](close) //10, 3StocD4h = Average[3](StocK4h) //3Rsi4h = Rsi[RsiP](close)//************************************************************************// LONG trades//************************************************************************a0 = FastMA4h > SlowMA4h //FastMA > SlowMA on higher TFa1 = FastMA15m CROSSES OVER SlowMA15m //FastMA crosses over SlowMA on lower TFa2 = Rsi4h > RsiMiddle //Rsi > Middle line on higher TFa3 = Rsi15m > RsiMiddle //Rsi > Middle line on lower TFa4 = StocD4h > StocOS //D > OS on higher TFa5 = StocK4h > StocD4h //K > D on higher TFa6 = StocD15m > StocOS //D > OS on lower TFa7 = StocK15m > StocD15m //K > D on lower TFa8 = StocK4h < StocOB //K < OB on higher TFa9 = Macd15m > Macd15m[1] //Macd increasing on lower TFax = a0 AND a1 AND a2 AND a3 AND a4 AND a5 AND a6 AND a7 AND a8 AND a9IF ax AND Not OnMarket THENSET TARGET pPROFIT TPSET STOP pLOSS SLBUY nLots CONTRACT AT MARKETENDIF//************************************************************************// SHORT trades//************************************************************************b0 = FastMA4h < SlowMA4h //FastMA < SlowMA on higher TFb1 = FastMA15m CROSSES UNDER SlowMA15m //FastMA crosses under SlowMA on lower TFb2 = Rsi4h < RsiMiddle //Rsi < Middle line on higher TFb3 = Rsi15m < RsiMiddle //Rsi < Middle line on lower TFb4 = StocD4h < StocOB //D < OB on higher TFb5 = StocK4h < StocD4h //K < D on higher TFb6 = StocD15m < StocOB //D < OB on lower TFb7 = StocK15m < StocD15m //K < D on lower TFb8 = StocK4h > StocOS //K > OS on higher TFb9 = Macd15m < Macd15m[1] //Macd decreasing on lower TFbx = b0 AND b1 AND b2 AND b3 AND b4 AND b5 AND b6 AND b7 AND b8 AND b9IF bx AND Not Onmarket THENSET TARGET pPROFIT TPSET STOP pLOSS SLSELLSHORT nLots CONTRACT AT MARKETENDIF//////////////////////////////////////////////////////////////////////////////////////////////////////////TIMEFRAME (default) //code to lock some profits//////////////////////////////////////////////////////////////////////////////////////////////////////////ONCE TrailStart = 15 //15 Start trailing profits from this pointONCE ProfitPerCent = 0.400 //40.0% Profit to keepIF Not OnMarket THENy1 = 0y2 = 0ELSIF LongOnMarket AND close > (TradePrice + (y1 * pipsize)) THEN //LONGx1 = (close - tradeprice) / pipsize //convert price to pipsIF x1 >= TrailStart THEN //go ahead only if N+ pipsy1 = max(x1 * ProfitPerCent, y1) //y = % of max profitENDIFIF y1 THEN //Place pending STOP order when y>0SELL AT Tradeprice + (y1 * pipsize) STOP //convert pips to priceENDIFELSIF ShortOnMarket AND close < (TradePrice - (y2 * pipsize)) THEN //SHORTx2 = (tradeprice - close) / pipsize //convert price to pipsIF x2 >= TrailStart THEN //go ahead only if N+ pipsy2 = max(x2 * ProfitPerCent, y2) //y = % of max profitENDIFIF y2 THEN //Place pending STOP order when y>0EXITSHORT AT Tradeprice - (y2 * pipsize) STOP //convert pips to priceENDIFENDIF6 users thanked author for this post.
07/19/2018 at 3:00 PM #76336great work!
1 user thanked author for this post.
07/19/2018 at 4:59 PM #76340tryin to make an MoneyManagement-System for it 😀
07/30/2018 at 7:08 PM #77105Just had this System stopped with the message below.
No entry in the Orders List under Cancelled / Rejected.
Never had this message before, anybody had it or know what it means? Wished I’d taken a screen shot.
Strategy Forced Stop
07/30/2018 at 7:22 PM #77107Never had this message before, anybody had it or know what it means?
Nope – but I would send a report especially as it is an MTF strategy and any issues need to be reported so we can get MFT on live sooner rather than later fully tested.
07/30/2018 at 7:35 PM #7710807/30/2018 at 7:52 PM #77109Share their answer!
08/26/2019 at 10:58 AM #105564Any answer GraHal?
08/26/2019 at 7:23 PM #105609Any answer GraHal?
Usual problem … even if I had an acknowledgement from PRT for the Tech Report they rarely quote any information from the Tech Report (or didn’t used to) and so I have no copy of what I sent as the Tech Report.
I just spent 15 mins doing an e-search of my email account linked to my Platform (and 3 other email accounts) and I cannot find anything relating to the Issue / error message – “Strategy Forced Stop” and also “forced stop”.
So I am sorry, but I have no reply / information to share.
Why anyway … have you had the same error message recently??
08/26/2019 at 7:56 PM #105613I never happened to see that message!
1 user thanked author for this post.
08/26/2019 at 8:48 PM #10561908/27/2019 at 10:24 AM #10564008/27/2019 at 10:41 AM #105641I think so, last June/July Nicolas reported that many issues between PRT and IG had been resolved, hopefully!
08/27/2019 at 11:19 AM #10564208/27/2019 at 11:28 AM #105645Mine was just over 40 days, yours is much longer.
Any strategy’s settings should be updated regularly. Once a month, I’d recommend.
If you plan to use settings so that it runs smoothly over one o more years then you’ll average down your profits, but you won’t spend much effort on it. If, instead, you aim to larger profits then you’ll have to update settings often, backtesting for shorter periods. This will imply more efforts, though.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on