Macd Stochastic Fractal MA5/25 Daily Marylin

Locked
phil_trade

Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

Post by phil_trade »

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...
phil_trade

Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

Post by phil_trade »

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 !
You do not have the required permissions to view the files attached to this post.
sponn
Trader
Posts: 348
Joined: Fri Jul 20, 2012 9:49 am

Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

Post by sponn »

Looks amazing. really. When you will be ready I would love to test it with tick data from 2007 until now.
phil_trade

Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

Post by phil_trade »

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.
phil_trade

Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

Post by phil_trade »

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.
You do not have the required permissions to view the files attached to this post.
User avatar
niepce
Trader
Posts: 152
Joined: Wed Jul 04, 2012 11:00 pm
Location: Grenoble, France

Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

Post by niepce »

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 !
phil_trade

Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

Post by phil_trade »

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 :)
phil_trade

Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

Post by phil_trade »

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;
phil_trade

Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

Post by phil_trade »

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.
musky
Trader
Posts: 54
Joined: Fri Nov 18, 2011 8:30 pm
Location: Northwoods

Re: MACD STOCHASTIC FRACTAL MA5/25 DAILY EA

Post by musky »

Hows the testing going on this?
Locked

Return to “Automated trading systems”