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
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.
Nor on 5 min TF … weird??
I 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.
Well 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):
//************************************************************************
// Cowabunga DAX
//
// https://www.babypips.com/trading/so_youve_finished_the_school_o
//************************************************************************
//
DEFPARAM CumulateOrders = False //Do not cumulate orders
DEFPARAM FlatBefore = 090000 //No Trades before 09:00
DEFPARAM FlatAfter = 200000 //No Trades after 21:00
DEFPARAM PreLoadBars = 10000
////////////////////////////////////////////////////////////////////////
TIMEFRAME (10 minutes, updateonclose) //10 minutes instead of 15
ONCE nLots = 1
ONCE TP = 65 //65
ONCE SL = 50 //50
ONCE AvgType = 1 //1 = ema
ONCE FastMA = 5 //5
ONCE SlowMA = 10 //10
FastMA15m = Average[FastMA,AvgType](close)
SlowMA15m = Average[SlowMA,AvgType](close)
ONCE StocOS = 25 //25 - 75 OverSold/OverBought tresholds
ONCE StocOB = 100 - StocOS
StocK15m = Stochastic[10,3](close) //10, 3
StocD15m = Average[3](StocK15m) //3
ONCE RsiMiddle = 50 //50
ONCE RsiP = 9 //9
Rsi15m = 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, 3
StocD4h = Average[3](StocK4h) //3
Rsi4h = Rsi[RsiP](close)
//
TIMEFRAME(default)
//************************************************************************
// LONG trades
//************************************************************************
a0 = FastMA4h > SlowMA4h //FastMA > SlowMA on higher TF
a1 = FastMA15m CROSSES OVER SlowMA15m //FastMA crosses over SlowMA on lower TF
a2 = Rsi4h > RsiMiddle //Rsi > Middle line on higher TF
a3 = Rsi15m > RsiMiddle //Rsi > Middle line on lower TF
a4 = StocD4h > StocOS //D > OS on higher TF
a5 = StocK4h > StocD4h //K > D on higher TF
a6 = StocD15m > StocOS //D > OS on lower TF
a7 = StocK15m > StocD15m //K > D on lower TF
a8 = StocK4h < StocOB //K < OB on higher TF
a9 = Macd15m > Macd15m[1] //Macd increasing on lower TF
ax = a0 AND a1 AND a2 AND a3 AND a4 AND a5 AND a6 AND a7 AND a8 AND a9
IF ax AND Not OnMarket THEN
SET TARGET pPROFIT TP
SET STOP pLOSS SL
BUY nLots CONTRACT AT MARKET
ENDIF
//************************************************************************
// SHORT trades
//************************************************************************
b0 = FastMA4h < SlowMA4h //FastMA < SlowMA on higher TF
b1 = FastMA15m CROSSES UNDER SlowMA15m //FastMA crosses under SlowMA on lower TF
b2 = Rsi4h < RsiMiddle //Rsi < Middle line on higher TF
b3 = Rsi15m < RsiMiddle //Rsi < Middle line on lower TF
b4 = StocD4h < StocOB //D < OB on higher TF
b5 = StocK4h < StocD4h //K < D on higher TF
b6 = StocD15m < StocOB //D < OB on lower TF
b7 = StocK15m < StocD15m //K < D on lower TF
b8 = StocK4h > StocOS //K > OS on higher TF
b9 = Macd15m < Macd15m[1] //Macd decreasing on lower TF
bx = b0 AND b1 AND b2 AND b3 AND b4 AND b5 AND b6 AND b7 AND b8 AND b9
IF bx AND Not Onmarket THEN
SET TARGET pPROFIT TP
SET STOP pLOSS SL
SELLSHORT nLots CONTRACT AT MARKET
ENDIF
//////////////////////////////////////////////////////////////////////////////////////////////////////////
// code to lock some profits
//////////////////////////////////////////////////////////////////////////////////////////////////////////
ONCE TrailStart = 15 //15 Start trailing profits from this point
ONCE ProfitPerCent = 0.400 //40.0% Profit to keep
IF Not OnMarket THEN
y1 = 0
y2 = 0
ELSIF LongOnMarket AND close > (TradePrice + (y1 * pipsize)) THEN //LONG
x1 = (close - tradeprice) / pipsize //convert price to pips
IF x1 >= TrailStart THEN //go ahead only if N+ pips
y1 = max(x1 * ProfitPerCent, y1) //y = % of max profit
ENDIF
IF y1 THEN //Place pending STOP order when y>0
SELL AT Tradeprice + (y1 * pipsize) STOP //convert pips to price
ENDIF
ELSIF ShortOnMarket AND close < (TradePrice - (y2 * pipsize)) THEN //SHORT
x2 = (tradeprice - close) / pipsize //convert price to pips
IF x2 >= TrailStart THEN //go ahead only if N+ pips
y2 = max(x2 * ProfitPerCent, y2) //y = % of max profit
ENDIF
IF y2 THEN //Place pending STOP order when y>0
EXITSHORT AT Tradeprice - (y2 * pipsize) STOP //convert pips to price
ENDIF
ENDIF
u still use this one Roberto? What timezon setting for it? does not get any good results when testing it.
No, I am not using it in real trading, just with my demo account.
Time zone is Utc+1 or Utc+2 DST (CET).