Macd Stochastic Fractal MA5/25 Daily Marylin

Locked
phil_trade

Re: Macd Stochastic Fractal MA5/25 Daily Marylin

Post by phil_trade »

My windev/Empty4 live account just reached +143% to celebrate our french July 14th! :ugeek:
User avatar
bodleytunes
Trader
Posts: 68
Joined: Tue Oct 02, 2012 8:38 am
Location: Stockport

Re: Macd Stochastic Fractal MA5/25 Daily Marylin

Post by bodleytunes »

I've been running Marilyn for a while now, and its been up and down, it's a demo starting with 4,000, which went down to about 2,200 and then built up decent positive equity until about a few days ago, getting to a maximum of £3750 (nearly earning it all back!), and then a "black swan" event has occurred and I'm back down to £2200 ish ... hopefully it can regain it again!

definitely shows promise though. :)
Radar
Trader
Posts: 437
Joined: Fri Mar 23, 2012 5:39 pm
Location: Round the bend ;)

Re: Macd Stochastic Fractal MA5/25 Daily Marylin

Post by Radar »

Hey Phil,
phil_trade wrote:My windev/Empty4 live account just reached +143% to celebrate our french July 14th! :ugeek:
July 14th, eh? Nothing to lose your head about, is it? ;)

Happy Bastille Day for Sunday! :)

Have fun!

Radar =8^)
Check out my new, (well, old now), manual trade & automatic scale-in manager,
StackManV2
phil_trade

Re: Macd Stochastic Fractal MA5/25 Daily Marylin

Post by phil_trade »

Radar wrote:Hey Phil,
phil_trade wrote:My windev/Empty4 live account just reached +143% to celebrate our french July 14th! :ugeek:
July 14th, eh? Nothing to lose your head about, is it? ;)

Happy Bastille Day for Sunday! :)

Have fun!

Radar =8^)
Hope I will keep it on my shoulders to maintain such good results !
phil_trade

Re: Macd Stochastic Fractal MA5/25 Daily Marylin

Post by phil_trade »

Hi all

New FT module to close trade with Slope Level. Hope Niepce could add it to Empty4 Marilyn !

On Gold for example, my 2009-2013 benchmark move from +31K$ to +35.9K$ with it.

If module ON, just move SL to MA25 +/- x pips if slope Level reached +/- param SlopeToMoveSLonMA25

so first, avoid to take trade if slope level already reached !
-> for BUY

Code: Select all

     //Evite Open/Close si use of Slope to close trade
     regle18 := (SlopeToMoveSLonMA25[kk] = 0) or (RoundTo(GetIndicatorValue(Slope_D1[kk],1,1),-3) < SlopeToMoveSLonMA25[kk]) ;
-> for SELL

Code: Select all

     //avoid Open/Close if use of Slope to close trade
     regle18 := (SlopeToMoveSLonMA25[kk] = 0) or (RoundTo(GetIndicatorValue(Slope_D1[kk],1,1),-3) > -(NegativeSlopeToMoveSLonMA25[kk])) ;
and second, control opened trades like this :

Code: Select all

    // Move SL on MA25 if Slope reach param level
    if SlopeToMoveSLonMA25[j]>0 then
    begin
    MonSlope := RoundTo(GetIndicatorValue(Slope_D1[j],1,1),-3);

      if (OrderType = tp_buy) and (MonSlope >= SlopeToMoveSLonMA25[j]) then
      begin
        NewSL := PaireMA25[j,1] - (DeltaPipsMA25ToMoveSLonSlope[j]*MonPoint);
        if (NewSL < MonBid - (10*Point)) and (RoundTo(NewSL,-Digits) > RoundTo(OrderStopLoss,-Digits)) then
        begin
        ModifyOrder(OrderTicket,OrderOpenPrice,NewSL,OrderTakeProfit);
        Lprint(PaireDevise[j]+'#'+IntToStr(OrderTicket)+' -> Move SL sur MA25 suite Slope >= '+MaValeurToStr(MonSlope,3) );
        end;
      end;

      if (OrderType = tp_sell) and (MonSlope <= -(NegativeSlopeToMoveSLonMA25[j])) then
      begin
      NewSL := PaireMA25[j,1] + (DeltaPipsMA25ToMoveSLonSlope[j]*MonPoint);
      if (NewSL > MonBid + (10*Point)) and ((RoundTo(NewSL,-Digits) < RoundTo(OrderStopLoss,-Digits)) or (OrderStopLoss=0)) then
      begin
      ModifyOrder(OrderTicket,OrderOpenPrice,NewSL,OrderTakeProfit);
        Lprint(PaireDevise[j]+'#'+IntToStr(OrderTicket)+' -> Move SL sur MA25 suite Slope <=  '+MaValeurToStr(MonSlope,3) );
        end;
      end;


    end;
Gold Slope level OK for me are 1.40 / -1.10 with delta pips 750.
phil_trade

Re: Macd Stochastic Fractal MA5/25 Daily Marylin

Post by phil_trade »

I confirm we get different results on different brokers, even with my Windev/Empty4 version, because of MACD difference.

For one customer who has an Cowboy IBFX Micro account ( different lot calculation + symbol name with "m" ) I have to setup a second Windev Master console. This second console, which calculate its indicators with Cowboy IBFX feed, took CHFJPY and EURJPY trades several hours before my master console, which calculated indicators with GPF feed.

So it's normal you have different result with Empty4 version on different brokers.

But this new customer account is already up +6% in 4 days :):)

cheers

Philippe
phil_trade

Re: Macd Stochastic Fractal MA5/25 Daily Marylin

Post by phil_trade »

Hi all

Is there still somebody there who follows this thread ? If I speak alone in the desert, thank you for inquiring :shock:

anyway, I follow my research with FT to improve Marilyn results. After the last module "close on slope", I'm so happy (and proud :oops: ) to release the "Close on PinBar" ( or may be the "Move SL on PinBar" and surely the 'Don't trade after these pinbar" :) )

The main work is the detection of PinBar... after that, we can do all we want with !

FT example to close trade after PinBar :

Code: Select all

      // Test sur Pinbar -> Move SL sur AM25 ou Close ?
      // PinBar
      if (PA_PinBar_Meche_Ratio[j] > 0) then
      begin
        if (OrderType = tp_buy) then
        begin
          if (IsBearishPinBar(PaireDevise[j],j) = true) then
          begin
            FermeTradeDevise(PaireDevise[j],tp_buy,0,999999);
            Lprint(PaireDevise[j]+' -> Close BUY sur Bearish PinBar' );
          end;
        end;

        if (OrderType = tp_sell) then
        begin
          if IsBullishPinBar(PaireDevise[j],j) then
          begin

            FermeTradeDevise(PaireDevise[j],tp_sell,0,999999);
            Lprint(PaireDevise[j]+' -> Close SELL sur Bullish PinBar' );
          end;
        end;
      end;
and the main detection module :

Code: Select all

Function IsBullishPinBar(MaDevise : string; MonIndex : integer) : boolean;
var
High0,Low0,Open0,Close0,High1,Low1,Open1,Close1,High2,Low2,Open2,Close2: double;
bar_length, wick_length, body_length, close_ratio, Ratio_Meche_Taille : double;
ValeurRetour: boolean;

  Procedure Calcul_OHLC(MaPeriode : integer);
  begin
    // Nouvelle bougie
    High0 := iHigh(MaDevise,MaPeriode,0);
    Low0 := iLow(MaDevise,MaPeriode,0);
    Open0 := iOpen(MaDevise,MaPeriode,0);
    Close0 := iClose(MaDevise,MaPeriode,0);

    // Bougie de la PinBar
    High1 := iHigh(MaDevise,MaPeriode,1);
    Low1 := iLow(MaDevise,MaPeriode,1);
    Open1 := iOpen(MaDevise,MaPeriode,1);
    Close1 := iClose(MaDevise,MaPeriode,1);

    // Bougie précédent la PinBar
    High2 := iHigh(MaDevise,MaPeriode,2);
    Low2 := iLow(MaDevise,MaPeriode,2);
    Open2 := iOpen(MaDevise,MaPeriode,2);
    Close2 := iClose(MaDevise,MaPeriode,2);

    bar_length := High1 - Low1;
    body_length := Abs(Open1 - Close1);
    wick_length := Min(Open1, Close1) - Low1;
    if bar_length>0 then Ratio_Meche_Taille := wick_length / bar_length else Ratio_Meche_Taille := 0;
  end;


  function CalculPinBar(MaPeriode : integer) : boolean ;
  var
  ValeurRetour: boolean;
  MonMultiplcateur : integer;
  MaTailleMini : integer;
  begin

  ValeurRetour := false;

  if MaPeriode = Period_H1 then
  begin
  MonMultiplcateur := PA_PinBar_Coeff_H1[Monindex];
  MaTailleMini := PA_PinBar_TailleMini_H1[Monindex];
  end;
  if MaPeriode = Period_H4 then
  begin
  MonMultiplcateur := PA_PinBar_Coeff_H4[Monindex];
  MaTailleMini := PA_PinBar_TailleMini_H4[Monindex];
  end;
  if MaPeriode = Period_D1 then
  begin
  MonMultiplcateur := PA_PinBar_Coeff_D1[Monindex];
  MaTailleMini := PA_PinBar_TailleMini_D1[Monindex];
  end;
  if MaPeriode = Period_W1 then
  begin
  MonMultiplcateur := PA_PinBar_Coeff_W1[Monindex];
  MaTailleMini := PA_PinBar_TailleMini_W1[Monindex];
  end;

    // Taille minimale
    if (abs(High1 - Low1) >= MaTailleMini * Point) then
    begin

    // High PinBar < High2 d'un delta pips mini
    if ((Low2 - Low1) > PA_PinBar_DeltaPipsMiniHigh_Low_1_2[MonIndex] * MonMultiplcateur * Point) then
    begin

      // Mèche > PA_PinBar_Meche_Ratio * Taille globale
      if ( Ratio_Meche_Taille >= (PA_PinBar_Meche_Ratio[MonIndex] / 100.0) ) then // looks like a bullish pinbar
      begin
          close_ratio := (high1 - close1 ) / bar_length;
          if (close_ratio < (PA_PinBar_Close_Ratio[MonIndex] / 100.0)) then
          begin
              // Corps de la PinBar inclus dans la bougie précédente (Open and close within previous bar)
              if (Open1 > Low2) and (Open1 < High2) and (Close1 > Low2) and (Close1 < High2) then
              begin
                ValeurRetour := true;
              end;
          end;
      end;

    end;

    end;

    result:= ValeurRetour;
  end;


begin
  ValeurRetour := false;

  // PinBar H1
  Calcul_OHLC(Period_H1);

  // PinBar basique - ajouter controle taille corps sur bougie N-1 / Low < tous les autes low précedents etc
  // analyse 1 seule fois en début de bougie

  if CalculPinBar(Period_H1)= true then
  begin
      if PA_PinBar_Coeff_H1[Monindex] >0 then
      begin
      ValeurRetour := true;
      if (Open0 = Close0) and (High0 = Low0)  then TraceLigne(MaDevise,Period_H1,0,psSolid,'BULLISH_H1',0);
      end;
  end;

  // PinBar H4
  Calcul_OHLC(Period_H4);

  if CalculPinBar(Period_H4)= true then
  begin
      if PA_PinBar_Coeff_H4[Monindex] >0 then
      begin
      ValeurRetour := true;
      if (Open0 = Close0) and (High0 = Low0)  then TraceLigne(MaDevise,Period_H4,0,psSolid,'BULLISH_H4',0);
      end;
  end;

  // PinBar D1
  Calcul_OHLC(Period_D1);

  // PinBar basique - ajouter controle taille corps sur bougie N-1 / Low < tous les autes low précedents etc
  // analyse 1 seule fois en début de bougie
  if CalculPinBar(Period_D1)= true then
  begin
      if PA_PinBar_Coeff_D1[Monindex] >0 then
      begin
      ValeurRetour := true;
      if (Open0 = Close0) and (High0 = Low0)  then TraceLigne(MaDevise,Period_D1,0,psSolid,'BULLISH_D1',0);
      end;
  end;

  // PinBar W1
  Calcul_OHLC(Period_W1);

  // PinBar basique - ajouter controle taille corps sur bougie N-1 / Low < tous les autes low précedents etc
  // analyse 1 seule fois en début de bougie
  if CalculPinBar(Period_W1)= true then
  begin
      if PA_PinBar_Coeff_W1[Monindex] >0 then
      begin
      ValeurRetour := true;
      if (Open0 = Close0) and (High0 = Low0)  then TraceLigne(MaDevise,Period_W1,0,psSolid,'BULLISH_W1',0);
      end;
  end;



result:= ValeurRetour;
end;
//----------------------------------------------------------------------

Code: Select all

Function IsBearishPinBar(MaDevise : string; MonIndex : integer) : boolean;
var
High0,Low0,Open0,Close0,High1,Low1,Open1,Close1,High2,Low2,Open2,Close2: double;
bar_length, wick_length, body_length, close_ratio, Ratio_Meche_Taille : double;
ValeurRetour: boolean;

  Procedure Calcul_OHLC(MaPeriode : integer);
  begin
    // Nouvelle bougie
    High0 := iHigh(MaDevise,MaPeriode,0);
    Low0 := iLow(MaDevise,MaPeriode,0);
    Open0 := iOpen(MaDevise,MaPeriode,0);
    Close0 := iClose(MaDevise,MaPeriode,0);

    // Bougie de la PinBar
    High1 := iHigh(MaDevise,MaPeriode,1);
    Low1 := iLow(MaDevise,MaPeriode,1);
    Open1 := iOpen(MaDevise,MaPeriode,1);
    Close1 := iClose(MaDevise,MaPeriode,1);

    // Bougie précédent la PinBar
    High2 := iHigh(MaDevise,MaPeriode,2);
    Low2 := iLow(MaDevise,MaPeriode,2);
    Open2 := iOpen(MaDevise,MaPeriode,2);
    Close2 := iClose(MaDevise,MaPeriode,2);

    bar_length := High1 - Low1;
    body_length := Abs(Open1 - Close1);
    wick_length := High1 - Max(Open1, Close1);
    if bar_length>0 then Ratio_Meche_Taille := wick_length / bar_length else Ratio_Meche_Taille := 0;
  end;


  function CalculPinBar(MaPeriode : integer) : boolean ;
  var
  ValeurRetour: boolean;
  MonMultiplcateur : integer;
  MaTailleMini  : integer;
  begin

  ValeurRetour := false;

  if MaPeriode = Period_H1 then
  begin
  MonMultiplcateur := PA_PinBar_Coeff_H1[Monindex];
  MaTailleMini := PA_PinBar_TailleMini_H1[Monindex];
  end;
  if MaPeriode = Period_H4 then
  begin
  MonMultiplcateur := PA_PinBar_Coeff_H4[Monindex];
  MaTailleMini := PA_PinBar_TailleMini_H4[Monindex];
  end;
  if MaPeriode = Period_D1 then
  begin
  MonMultiplcateur := PA_PinBar_Coeff_D1[Monindex];
  MaTailleMini := PA_PinBar_TailleMini_D1[Monindex];
  end;
  if MaPeriode = Period_W1 then
  begin
  MonMultiplcateur := PA_PinBar_Coeff_W1[Monindex];
  MaTailleMini := PA_PinBar_TailleMini_W1[Monindex];
  end;

    // Taille minimale
    if (abs(High1 - Low1) >= MaTailleMini * Point) then
    begin

      // High PinBar > High2 d'un delta pips mini
      if ((High1 - High2) > PA_PinBar_DeltaPipsMiniHigh_Low_1_2[MonIndex] * MonMultiplcateur * Point) then
      begin

      // Mèche > PA_PinBar_Meche_Ratio * Taille globale
      if ( Ratio_Meche_Taille >= (PA_PinBar_Meche_Ratio[MonIndex] / 100.0) ) then // looks like a bullish pinbar
      begin
          close_ratio := (close1 - low1 ) / bar_length;
          if (close_ratio < (PA_PinBar_Close_Ratio[MonIndex] / 100.0)) then
          begin
              // Corps de la PinBar inclus dans la bougie précédente (Open and close within previous bar)
              if (Open1 > Low2) and (Open1 < High2) and (Close1 > Low2) and (Close1 < High2) then
              begin
                ValeurRetour := true;
              end;
          end;
      end;

      end;
    end;

    result:= ValeurRetour;
  end;


begin
   ValeurRetour := false;

  // PinBar H1
  Calcul_OHLC(Period_H1);

  // PinBar basique - ajouter controle taille corps sur bougie N-1 / Low < tous les autes low précedents etc
  // analyse 1 seule fois en début de bougie
  if CalculPinBar(Period_H1)= true then
  begin
      if PA_PinBar_Coeff_H1[Monindex] >0 then
      begin
      ValeurRetour := true;
      if (Open0 = Close0) and (High0 = Low0)  then TraceLigne(MaDevise,Period_H1,0,psSolid,'BULLISH_H1',0);
      end;
  end;

  // PinBar H4
  Calcul_OHLC(Period_H4);

  // PinBar basique - ajouter controle taille corps sur bougie N-1 / Low < tous les autes low précedents etc
  // analyse 1 seule fois en début de bougie
  if CalculPinBar(Period_H4)= true then
  begin
      if PA_PinBar_Coeff_H4[Monindex] >0 then
      begin
      ValeurRetour := true;
      if (Open0 = Close0) and (High0 = Low0)  then TraceLigne(MaDevise,Period_H4,0,psSolid,'BULLISH_H4',0);
      end;
  end;

  // PinBar D1
  Calcul_OHLC(Period_D1);

  // PinBar basique - ajouter controle taille corps sur bougie N-1 / Low < tous les autes low précedents etc
  // analyse 1 seule fois en début de bougie
  if CalculPinBar(Period_D1)= true then
  begin
      if PA_PinBar_Coeff_D1[Monindex] >0 then
      begin
      ValeurRetour := true;
      if (Open0 = Close0) and (High0 = Low0)  then TraceLigne(MaDevise,Period_D1,0,psSolid,'BULLISH_D1',0);
      end;
  end;

  // PinBar W1
  Calcul_OHLC(Period_W1);

  // PinBar basique - ajouter controle taille corps sur bougie N-1 / Low < tous les autes low précedents etc
  // analyse 1 seule fois en début de bougie
  if CalculPinBar(Period_W1)= true then
  begin
      if PA_PinBar_Coeff_W1[Monindex] >0 then
      begin
      ValeurRetour := true;
      if (Open0 = Close0) and (High0 = Low0)  then TraceLigne(MaDevise,Period_W1,0,psSolid,'BULLISH_W1',0);
      end;
  end;

result:= ValeurRetour;
end;
//----------------------------------------------------------------------
For now, I'm just using D1 PinBar detection and doing some calculation to detect the best param for :
wick_length, close_ratio and DeltaPipsMiniHigh_Low. But first result show a very good balance increase with €/$ to about +26% !

If someone interested...let me know !

cheers

Philippe
ck0805
Trader
Posts: 16
Joined: Mon May 06, 2013 9:18 am
Location: SG

Re: Macd Stochastic Fractal MA5/25 Daily Marylin

Post by ck0805 »

phil_trade wrote:Hi all

New FT module to close trade with Slope Level. Hope Niepce could add it to Empty4 Marilyn !
Hi Phil,
What is this new FT module based on to get the Slope Level? Is it the slope of the D1 CSS indicator that was mentioned a few posts back?



cheers
ck
phil_trade

Re: Macd Stochastic Fractal MA5/25 Daily Marylin

Post by phil_trade »

ck0805 wrote:
phil_trade wrote:Hi all

New FT module to close trade with Slope Level. Hope Niepce could add it to Empty4 Marilyn !
Hi Phil,
What is this new FT module based on to get the Slope Level? Is it the slope of the D1 CSS indicator that was mentioned a few posts back?



cheers
ck
Hi

this one :
PostPosted: 16 Jul 2013, 07:16

Hi all

New FT module to close trade with Slope Level. Hope Niepce could add it to Empty4 Marilyn !
User avatar
Ingot54
Trader
Posts: 249
Joined: Sun Feb 03, 2013 12:07 pm
Location: Sunshine Coast, Queensland

Re: Macd Stochastic Fractal MA5/25 Daily Marylin

Post by Ingot54 »

Hi Philippe

Just to let you know I am a silent lurker to this thread - I am subscribed.

My skills do not extend to contributing to the development of this, but I am interested in seeing it come to fruit.

Your hard work is noticed and appreciated.
Merci.

Ivan
In some haystacks there is no needle
Locked

Return to “Automated trading systems”