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.
-
-
08/27/2019 at 11:36 AM #105646
Not really the same ratio Robertgozzi gave.
Time has moved on and market / Dax profile is different now and so the variables need re optimising in order to get better results / similar to Roberto back in July 2018??
I also get no trades when bt over 100k bars on DAX TF 1 min with Roberto original code at the top of this Thread
08/27/2019 at 11:48 AM #105648Not really the same ratio Robertgozzi gave.
Time has moved on and market / Dax profile is different now and so the variables need re optimising in order to get better results / similar to Roberto back in July 2018??
I also get no trades when bt over 100k bars on DAX TF 1 min with Roberto original code at the top of this Thread.
Nor on 5 min TF … weird??
10/11/2020 at 10:46 PM #147080I was testing the Cowabunga system for PRT,but as Grahal said it doesnt send any trades. The problem is that theres a little bug : A TIMEFRAME(default) instruction should be added after line 37 (see 1st post ) so the system returns to the 10m TF, otherwise the system is working in the 4H TF not in the 10m like it should.
1 user thanked author for this post.
10/12/2020 at 1:10 AM #147088Well spotted @pableitor!
I must have mistakingly written TIMEFRAME(default) at line 77 after testing, for some unknown reason.
Here is the correct code (and ITF file):
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101//************************************************************************// 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 = 10000////////////////////////////////////////////////////////////////////////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)//TIMEFRAME(default)//************************************************************************// 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//////////////////////////////////////////////////////////////////////////////////////////////////////////// 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 priceENDIFENDIF10/24/2020 at 4:56 PM #14834310/24/2020 at 8:31 PM #148357No, I am not using it in real trading, just with my demo account.
Time zone is Utc+1 or Utc+2 DST (CET).
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on