Questions from Beginners MQL5 MT5 MetaTrader 5 - page 184

 
rosomah:
If I put after indHandle = iMA(_Symbol,0,ma_ind_p,0,0,indStochasticHandle);

the compiler will find - 0, because iMA has only zero buffer. The above handle is not taken into account.

To rephrase my question, - what do I need to do to get a stochastic handle with buffer-1 into iMA? What action needs to be done between these two lines.

{ int indStochasticHandle = iStochastic(_Symbol,0,5,3,3,MODE_SMA,STO_LOWHIGH); // iStochastic indicator handle

???????????????????????????????????????????????????????

indHandle = iMA(_Symbol,0,ma_ind_p,0,0,indStochasticHandle);} //

Please insert code with "SRC" button - otherwise it's hard to see what you want
 
rosomah:
If I put after indHandle = iMA(_Symbol,0,ma_ind_p,0,0,indStochasticHandle);

The compiler will find - 0, because iMA has only zero buffer. The upstream handle is not taken into account.

To rephrase the question, - what do I need to do to get the stochastic handle with buffer-1 into iMA? What action needs to be done between these two lines.

{ int indStochasticHandle = iStochastic(_Symbol,0,5,3,3,MODE_SMA,STO_LOWHIGH); // iStochastic indicator handle

???????????????????????????????????????????????????????

indHandle = iMA(_Symbol,0,ma_ind_p,0,0,indStochasticHandle);} //

Look towardsiCustom():

Forum on Trading, Automated Trading Systems & Strategy Testing

How do I take the Moving Average from an indicator and not from a chart?

sergey1294, 2011.03.22 00:21

...

To receive values of a custom indicator from other mql5 programs, the iCustom() function is used, which returns the indicator handle for further operations. You can also specify the appropriate price[] array or the handle of another indicator. This parameter should be passed last in the list of input variables of the custom indicator.

Example:

voidOnStart()
{
//---
stringterminal_path=StatusInfoString(STATUS_TERMINAL_PATH);
int handle_customMA=iCustom(Symbol(),PERIOD_CURRENT,"Custom Moving Average",13,0,MODE_EMA,PRICE_TYPICAL);
if(handle_customMA>0)
Print("handle_customMA = ",handle_customMA);
else
Print("Cannot open or not EX5 file '"+terminal_path+"\\MQL5\\\\Indicators\\"+"Custom Moving Average.ex5");
}

In this example, the last parameter passed is PRICE_TYPICAL (from enumeration ENUM_APPLIED_PRICE) which indicates that the custom indicator will be built on typical prices obtained as (High+Low+Close)/3. If this parameter is not specified, the indicator is built based on PRICE_CLOSE values, i.e. closing prices of each bar.

...



 
{  int indStochasticHandle = iStochastic(_Symbol,0,5,3,3,MODE_SMA,STO_LOWHIGH); 

//что нужно сделать что бы хэндл стохастика с буфером-1 попал в iMA? Какие действия нужно провести 
//между этими двумя строчками.

 indHandle = iMA(_Symbol,0,ma_ind_p,0,0,indStochasticHandle);}  // 
 
barabashkakvn:

Look towardsiCustom():

Thanks for wanting to help, I've read about five different articles here. To substitute the 0th buffer of any indicator,- in a mask or in any other simply. But none of them say how to substitute the next buffers. I assume that I should copy an array from one indicator to another, but how?
 
rosomah:
indHandle =  iMA(Symbol(),PERIOD_CURRENT,"iMa_on_Stochastic",13,0,MODE_EMA,indStochasticHandle)
 
please advise where in the mt4 terminal the signal is set up (to set the volume from the provider to the subscriber)
 

Can you please tell me how to get rid of the warning about data loss during conversion.Function SymbolInfoInteger returns value of long type, even though int type is required where my variable is used.)

Or how else to find out the number of decimal places in an arbitrary symbol ?

double tp=0.0;  
string   i_symbol;        // символ для всех операций
int digits=SymbolInfoInteger(i_symbol,SYMBOL_DIGITS); // число знаков в символе после запятой
tp=NormalizeDouble(tp,digits);
 
lewvik:

Can you please tell me how to get rid of the warning about data loss during conversion.Function SymbolInfoInteger returns value of long type, even though int type is required where my variable is used.)

Or how else to find out the number of decimal places in an arbitrary symbol ?

   double tp=0.0;
   string   i_symbol;        // символ для всех операций
   int digits=int(SymbolInfoInteger(i_symbol,SYMBOL_DIGITS)); // число знаков в символе после запятой
   tp=NormalizeDouble(tp,digits);

 
barabashkakvn:

Thank you! I'm not very good at typing )))
 

Hi.

I'm trying to convert to five, but I still don't understand the logic of syntax.

How to convert double i= iHigh(Symbol(),0,1); from indicator four to mql5,

I can not give any idea yet.

Thanks

Reason: