You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Is it possible to call same indicator via the iCustom() function more than once within one tick?
I am thinking to use constant MODE value and variable PARAMETERS to multiplex data to same buffer[shift], thus creating serial like output from an indicator.
//Calling indicator:
start()
{
data[0]=iCustom(symbol, timeframe, name, 0, 0, shift);
data[1]=iCustom(symbol, timeframe, name, 1, 0, shift);
data[2]=iCustom(symbol, timeframe, name, 2, 0, shift);
data[3]=iCustom(symbol, timeframe, name, 3, 0, shift);
}
..
..
//Responding indicator:
start()
{
if(parameter==0) OutputBuffer0[shift]=data[0];
if(parameter==1) OutputBuffer0[shift]=data[1];
if(parameter==2) OutputBuffer0[shift]=data[2];
if(parameter==3) OutputBuffer0[shift]=data[3];
}