Requests & Ideas (MQL5 only!) - page 37

 
Vladimir Karputov:

Please indicate the URL of the Expert Advisor.


Dear Mr.Vladimir, tks for the reply.

for example this EA (made by you).


https://www.mql5.com/en/code/18440

the function "trailing"

void Trailing()

the suggest change to it

input bool         InpTrailingtoEntrance   = false;           // Trailing to Entrace (or to bottom)


calling it..
if you want to move from bottom/stoploss
Trailing(false)

if you want to move to entrace operation
Trailing(true)


void Trailing(bool Move_to_entrace=true))



Crossing of two iMA
Crossing of two iMA
  • votes: 19
  • 2017.08.10
  • Vladimir Karputov
  • www.mql5.com
Crossover of two iMAs (Moving Averages), one more iMA (Moving Average) is used as the filter. Position Lot calculation: manually or risk percent of balance. Trading method: Stop, Market or Limit orders. "Parameters of the first Moving Average"; "Parameters of the second Moving Average"; "Parameters of the Third Moving Average"; Third...
 
zemo :

Dear Mr.Vladimir, tks for the reply.

for example this EA (made by you).


https://www.mql5.com/en/code/18440

the function "trailing"

void  Trailing()

the suggest change to it

input  bool          InpTrailingtoEntrance   = false ;            // Trailing to Entrace (or to bottom)


calling it..
if you want to move from bottom/stoploss
Trailing(false)

if you want to move to entrace operation
Trailing(true)


void  Trailing( bool Move_to_entrace=true) )




Please note: each published code is discussed in its own branch.

 

Vladimir this is another topic about "mt4 to mt5".... ;-)

the component is "SS_SupportResistance_v07.53.mq4"

I'm looking for mt5 version ...

and the expert sample with the indicator


tks

 
zemo :

Vladimir this is another topic about "mt4 to mt5".... ;-)

the component is "SS_SupportResistance_v07.53.mq4"

I'm looking for mt5 version ...

and the expert sample with the indicator


tks


No. In this thread, the old code is strongly discouraged. If you are sitting on an old terminal - it's YOUR problem.

Post   - an exception. Created exclusively for the popularization of the new function of the MetaEditor editor - public projects.

 
Vladimir Karputov :

Forum on trading, automated trading systems and testing trading strategies

Requests & Ideas (MQL5 only!)

Vladimir Karputov , 2018.01.05 13:04

So, how to connect to the project:

1. Reload the MetaEditor

2. Right click on the project "MT4_To_MT5_Indicat" ( tab "Toolbox" ) and select "Join"

Right click on the project "MT4_To_MT5_Indicat" (tab "Toolbox") and select "Join"

3. Right click on the project "MT4_To_MT5_Indicat" ( tab "Navigator" ) and select "Update from Storage"

Right click on the project "MT4_To_MT5_Indicat" (tab "Navigator") and select "Update from Storage"


I'll call this indicator like this: SAR based on MA.

 
Vladimir Karputov :


I'll call this indicator like this: SAR based on MA.


It's hard, something to keep in touch with @Chris Mukengeshayi 


I will do this: I will publish here in steps how to write a SAR indicator based on the MA indicator.

 

The indicator "SAR index based on MA.mq5"

Step one: save the standard "ParabolicSAR.mq5" under the new name "SAR index based on MA.mq5"

save the standard "ParabolicSAR.mq5" under the new name "SAR index based on MA.mq5"

Please note: we save to the folder  [data folder]\MQL5\Indicators\

 

Step 2:

First of all, since I will make changes to the code, I will change the "cap".

This "cap" was:

 //+------------------------------------------------------------------+ 
 //|                                                 ParabolicSAR.mq5 | 
 //|                   Copyright 2009-2017, MetaQuotes Software Corp. | 
 //|                                              http://www.mql5.com | 
 //+------------------------------------------------------------------+ 
 #property  copyright "2009-2017, MetaQuotes Software Corp." 
 #property  link        "http://www.mql5.com" 

now the "cap" is this:

 //+------------------------------------------------------------------+ 
 //|                                        SAR index based on MA.mq5 | 
 //|                              Copyright © 2018, Vladimir Karputov | 
 //|                                           http://wmua.ru/slesar/ | 
 //+------------------------------------------------------------------+ 
 #property  copyright "Copyright © 2018, Vladimir Karputov" 
 #property  link        "http://wmua.ru/slesar/" 
 #property  version    "1.000" 

The color in the source code is set in the old units. Let's correct this.

It was:

 //--- indicator settings 
 #property  indicator_chart_window 
 #property  indicator_buffers 3 
 #property  indicator_plots    1 
 #property  indicator_type1    DRAW_ARROW 
 #property  indicator_color1   DodgerBlue

So it became:

 //--- indicator settings 
 #property  indicator_chart_window 
 #property  indicator_buffers 3 
 #property  indicator_plots    1 
 #property  indicator_type1    DRAW_ARROW 
 #property  indicator_color1    clrDodgerBlue 

Also I hate writing of this kind:

   else ExtSarMaximum=InpSARMaximum;

I prefer to write like this:

   else 
      ExtSarStep=InpSARStep;

And further on the code - I everywhere removed records in one line.


It remains to change the version to 1.001 and save it to the Vault.

Files:
 

Step three.

We begin integrating the iMA code into our indicator.

We start with the "caps": add the indicator buffer Moving Average, add one graphic series (DRAW_LINE).

It was:

 //--- indicator settings 
 #property  indicator_chart_window 
 #property  indicator_buffers 3 
 #property  indicator_plots    1 
 #property  indicator_type1    DRAW_ARROW 
 #property  indicator_color1    clrDodgerBlue 
 //--- External parametrs 
 input double          InpSARStep= 0.02 ;     // Step 
 input double          InpSARMaximum= 0.2 ;   // Maximum 
 //---- buffers 
 double                ExtSARBuffer[];
 double                ExtEPBuffer[];
 double                ExtAFBuffer[];
 //--- global variables 
 int                   ExtLastRevPos;
 bool                  ExtDirectionLong;
 double                ExtSarStep;
 double                ExtSarMaximum;

Became:

 //--- indicator settings 
 #property  indicator_chart_window 
 #property  indicator_buffers 4 
 #property  indicator_plots    2 
 #property  indicator_type1    DRAW_ARROW 
 #property  indicator_color1    clrDodgerBlue 
 #property  indicator_type2    DRAW_LINE 
 #property  indicator_color2    clrRed 
 //--- External parametrs 
 input double          InpSARStep= 0.02 ;     // Step 
 input double          InpSARMaximum= 0.04 ; // Maximum 
 //---- buffers 
 double                ExtSARBuffer[];
 double                ExtMABuffer[]; 
 double                ExtEPBuffer[];
 double                ExtAFBuffer[];
 //--- global variables 
 int                   ExtLastRevPos;
 bool                  ExtDirectionLong;
 double                ExtSarStep;
 double                ExtSarMaximum;
 //--- 
 int     handle_iMA;                           // variable for storing the handle of the iMA indicator  
 //--- we will keep the number of values in the Moving Average indicator  
 int     bars_calculated= 0 ; 

We save version 1.002 and send it to the Storage.

Files:
 
Alain Verleyen:

?

Reason: