stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Macd Stochastic Fractal MA5/25 Daily Marylin
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1448
Page 4 of 141
Author:  phil_trade [ Sun Feb 10, 2013 10:45 pm ]
Post subject:  Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

It seems I found a way to avoid not trendy zone : a "mini level MACD to take trade" with "Partial Close On Friday" option active for this pair :

AUDJPY was a looser pair and now reach 260% in 2011-2012 with a profit factor of 3.45 !

I also add a StochSlow control to avoid some bad trade.

so for sell conditions :

Code: Select all

                   //Sell
                   if ( NbTradeSell < MACD_NbTradeMax[kk]) and (NbTradeBuy = 0) and
                      ( PaireMACD_D1Main[kk,1] < PaireMACD_D1Main[kk,2]) and ( PaireMACD_D1Main[kk,2] < PaireMACD_D1Main[kk,3]) and
                      ( _STOD1SLOW[kk,1] >= 100-MACD_StochLevelToTrade[kk]) and ( _STOD1FAST[kk,1] <  _STOD1SLOW[kk,1])
                      and ( _STOD1FAST[kk,1] <  _STOD1FAST[kk,2]) and ( _STOD1SLOW[kk,1] < _STOD1SLOW[kk,2]) and
                      ( PaireMA5[kk,1] < PaireMA5[kk,2]) and ( PaireMA5[kk,2] < PaireMA5[kk,3]) and ( PaireMA25[kk,1] - PaireMA25[kk,2] < MACD_DeltaPipsMA25[kk]*Point ) and
                      ((MonNbHour > MACD_HOURDELAY[kk] ) or (MonNbHour=9999)) and ((MonNbHourHistoBUY > MACD_HOURDELAY2[kk] ) or (MonNbHourHistoBUY=9999)) and
                      ( (PaireMACD_D1Main[kk,3] >= MACD_LevelMinTotrade[kk]) or (PaireMACD_D1Main[kk,1] <= -MACD_LevelMinTotrade[kk]) ) then
                   begin
and for Buy

Code: Select all

                   //Buy
                   if ( NbTradeBuy < MACD_NbTradeMax[kk]) and (NbTradeSell = 0) and
                      ( PaireMACD_D1Main[kk,1] > PaireMACD_D1Main[kk,2]) and ( PaireMACD_D1Main[kk,2] > PaireMACD_D1Main[kk,3]) and
                      ( _STOD1SLOW[kk,1] <= MACD_StochLevelToTrade[kk]) and ( _STOD1FAST[kk,1] >  _STOD1SLOW[kk,1]) and ( _STOD1FAST[kk,1] >  _STOD1FAST[kk,2]) and
                      ( _STOD1SLOW[kk,1] >  _STOD1SLOW[kk,2]) and
                      ( PaireMA5[kk,1] > PaireMA5[kk,2]) and ( PaireMA5[kk,2] > PaireMA5[kk,3]) and ( PaireMA25[kk,2] - PaireMA25[kk,1] < MACD_DeltaPipsMA25[kk]*Point ) and
                      ((MonNbHour > MACD_HOURDELAY[kk] ) or (MonNbHour=9999)) and ((MonNbHourHistoBUY > MACD_HOURDELAY2[kk] ) or (MonNbHourHistoBUY=9999)) and
                      ( (PaireMACD_D1Main[kk,1] >= MACD_LevelMinTotrade[kk]) or (PaireMACD_D1Main[kk,3] <= -MACD_LevelMinTotrade[kk]) ) then
So Niepce, could you adapt MQL code for this new filter and
- Put Fixed lot parameter
- Spread Max to take trade for Buy and Close Trade for Sell
- New Param Stoch OBOS level instead of fix 10/90
- Option to use Filter Trade with Fractal ( false by default)

Time to bed for me...
Author:  phil_trade [ Mon Feb 11, 2013 9:25 am ]
Post subject:  Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

New pairs to add to the 5 (EURUSD / XAUUSD / CHFJPY / EURJPY / USDCHF )

AUDJPY good results with Profit Factor 5.12
AUDJPY 2011 2012.PNG
Let's start with another one... Hope my not trendy zone detection will work with the other pairs !
Author:  sponn [ Mon Feb 11, 2013 11:07 am ]
Post subject:  Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

Looks amazing. really. When you will be ready I would love to test it with tick data from 2007 until now.
Author:  phil_trade [ Mon Feb 11, 2013 11:23 am ]
Post subject:  Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

sponn wrote:Looks amazing. really. When you will be ready I would love to test it with tick data from 2007 until now.
EA will be available this week I hope.

Not sure you need tick data as I read data only once per minute..Don't forget it's a daily strategy :)

And you will have first to adapt some parameters, as they have been statisticaly calculated from 01/2011-01/2013 to be more accurate for live trading in 2013.

or may be..it will be OK ! I will also do a test in M1 from 2008 but I don't trust a lot so far data as they don't reflect anymore today market movement.
Author:  phil_trade [ Mon Feb 11, 2013 2:31 pm ]
Post subject:  Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

New record with 6 pairs since AUDJPY joined the group !
6 Pairs MACD DAILY with AUDJPY 2011-2013.PNG
Live Windev/Empty4 is also permorming well with AUDJPY / EURUSD / XAUUSD and USDCHF now running.

other pairs are only there for test purpose.
Live Windev Empty4 TEST.PNG
I will test in // tomorrow Empty4/MQL version of NIEPCE and do some controls before uploading EA with Profiles and Setting for the forum.
Author:  niepce [ Mon Feb 11, 2013 5:20 pm ]
Post subject:  Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

phil_trade wrote: I will test in // tomorrow Empty4/MQL version of NIEPCE and do some controls before uploading EA with Profiles and Setting for the forum.
Phil,
Make sure you use beta version 0.22 I just sent you.
Otherwise, we should allow us a good week for debugging. Unfortunately I don't manage to backtest it (multiple calls to MarketInfo()..), so forward testing is the only option here to chase bugs, and one week for a daily EA is the very minimum !
Author:  phil_trade [ Mon Feb 11, 2013 5:46 pm ]
Post subject:  Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

niepce wrote:
phil_trade wrote: I will test in // tomorrow Empty4/MQL version of NIEPCE and do some controls before uploading EA with Profiles and Setting for the forum.
Phil,
Make sure you use beta version 0.22 I just sent you.
Otherwise, we should allow us a good week for debugging. Unfortunately I don't manage to backtest it (multiple calls to MarketInfo()..), so forward testing is the only option here to chase bugs, and one week for a daily EA is the very minimum !
OK..I'm waiting V0.29 :)
Author:  phil_trade [ Wed Feb 13, 2013 6:50 am ]
Post subject:  Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

New improvment in exit strategy. All pairs results are better !

Added delta pips between 3 MACD bars to controled exit :

Code: Select all

    if (OrderType = tp_sell) and (PaireMACD_D1Main[j,1] > PaireMACD_D1Main[j,2]) and (PaireMACD_D1Main[j,2] > PaireMACD_D1Main[j,3]) and
    (PaireMACD_D1Main[j,1] - PaireMACD_D1Main[j,3] >= MACD_DeltaPipsInterMacdToClose[j]*Point)then
    begin
      if (GetProfitDevise(PaireDevise[j],OrderTicket) < 0) and (MonBid > ReturnHighOpenPrice(PaireDevise[j],OrderTicket)) then
      begin
        Lprint(PaireDevise[j]+' -> Solde Sell sur Perte et 3 MACD haussiers ' );
        FermeTradeDevise(PaireDevise[j],tp_sell,0,999999);
        exit;
      end;

Code: Select all

    if (OrderType = tp_buy) and (PaireMACD_D1Main[j,1] < PaireMACD_D1Main[j,2]) and (PaireMACD_D1Main[j,2] < PaireMACD_D1Main[j,3])and
    (PaireMACD_D1Main[j,3] - PaireMACD_D1Main[j,1] >= MACD_DeltaPipsInterMacdToClose[j]*Point) then
    begin
      if (GetProfitDevise(PaireDevise[j],OrderTicket) < 0)  and (MonBid < ReturnLowOpenPrice(PaireDevise[j],OrderTicket)) then
      begin
        Lprint(PaireDevise[j]+' -> Solde BUY sur Perte et 3 MACD baissiers ' );
        FermeTradeDevise(PaireDevise[j],tp_buy,0,999999);
        exit;
      end;
Author:  phil_trade [ Wed Feb 13, 2013 6:59 am ]
Post subject:  Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

Also added new stochastic H4 entry rule option. Some pairs, like AUDUSD, go quick to STOCH D1 OBOS and stay a long time there, so no trade is taken buy my strategy. But, Stoch H4 still breath !

AUDUSD was a loosy pair with Stoch D1 only and now give +250% in my test panel from 2011-2013

Code: Select all

                   //Buy
                   if ( NbTradeBuy < MACD_NbTradeMax[kk]) and (NbTradeSell = 0) and
                      ( PaireMACD_D1Main[kk,1] > PaireMACD_D1Main[kk,2]) and ( PaireMACD_D1Main[kk,2] > PaireMACD_D1Main[kk,3]) and
                      ( (( _STOD1SLOW[kk,1] <= MACD_StochLevelToTrade[kk]) and ( _STOD1FAST[kk,1] >  _STOD1SLOW[kk,1]) and ( _STOD1FAST[kk,1] >  _STOD1FAST[kk,2]) and
                      ( _STOD1SLOW[kk,1] >  _STOD1SLOW[kk,2])) or
                      ( (UseStochH4ToTakeTrade[i]=true) and (_STOD1SLOW[kk,1] > MACD_StochLevelToTrade[kk]) and
                      (_STOH4FAST[kk,1]<30) and ( _STOH4FAST[kk,1] > _STOH4FAST[kk,2]) and ( _STOH4FAST[kk,1] > _STOH4Slow[kk,1]) ) ) and
                      ( PaireMA5[kk,1] > PaireMA5[kk,2]) and ( PaireMA5[kk,2] > PaireMA5[kk,3]) and ( PaireMA25[kk,2] - PaireMA25[kk,1] < MACD_DeltaPipsMA25[kk]*Point ) and
                      ((MonNbHour > MACD_HOURDELAY[kk] ) or (MonNbHour=9999)) and ((MonNbHourHistoBUY > MACD_HOURDELAY2[kk] ) or (MonNbHourHistoBUY=9999)) and
                      ( (PaireMACD_D1Main[kk,1] >= MACD_LevelMinTotrade[kk]) or (PaireMACD_D1Main[kk,3] <= -MACD_LevelMinTotrade[kk]) ) then
                   begin

Code: Select all

                   //Sell
                   if ( NbTradeSell < MACD_NbTradeMax[kk]) and (NbTradeBuy = 0) and
                      ( PaireMACD_D1Main[kk,1] < PaireMACD_D1Main[kk,2]) and ( PaireMACD_D1Main[kk,2] < PaireMACD_D1Main[kk,3]) and
                      ( (( _STOD1SLOW[kk,1] >= 100-MACD_StochLevelToTrade[kk]) and ( _STOD1FAST[kk,1] <  _STOD1SLOW[kk,1])
                      and ( _STOD1FAST[kk,1] <  _STOD1FAST[kk,2]) and ( _STOD1SLOW[kk,1] < _STOD1SLOW[kk,2])) or
                      ( (UseStochH4ToTakeTrade[i]=true) and (_STOD1SLOW[kk,1] < 100-MACD_StochLevelToTrade[kk]) and
                      (_STOH4FAST[kk,1] > 70) and ( _STOH4FAST[kk,1] < _STOH4FAST[kk,2]) and ( _STOH4FAST[kk,1] < _STOH4Slow[kk,1]) ) ) and
                      ( PaireMA5[kk,1] < PaireMA5[kk,2]) and ( PaireMA5[kk,2] < PaireMA5[kk,3]) and ( PaireMA25[kk,1] - PaireMA25[kk,2] < MACD_DeltaPipsMA25[kk]*Point ) and
                      ((MonNbHour > MACD_HOURDELAY[kk] ) or (MonNbHour=9999)) and ((MonNbHourHistoBUY > MACD_HOURDELAY2[kk] ) or (MonNbHourHistoBUY=9999)) and
                      ( (PaireMACD_D1Main[kk,3] >= MACD_LevelMinTotrade[kk]) or (PaireMACD_D1Main[kk,1] <= -MACD_LevelMinTotrade[kk]) ) then
                   begin
So Niepce...some new stuff to add to your MQL code :lol: and for me, new backtest with all other pairs to complete the 7 actual pairs. I will publish global result asap.
Author:  musky [ Wed Feb 13, 2013 1:42 pm ]
Post subject:  Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

Hows the testing going on this?
All times are UTC Page 4 of 141