Here's an example of how I use the indicator, they're all the same.
double iMAf( string symbol, ENUM_TIMEFRAMES timeframe, int period, int ma_shift, ENUM_MA_METHOD ma_method, int applied_price, int shift){
int handle=iMA(symbol,timeframe,periodd(period),ma_shift, ma_method,applied_price);Sleep(2000);
CopyBuffer(handle,0,0,100,MA);
ArraySetAsSeries(MA,true);
return( (MA[shift])); }
Prescribed outside all functions
double MA[];
//---- handles for indicatorsint MA_handle;
Did I write something wrong in general, or where to look in general, what is wrong with it?
I'm sorry, what would make the handle redraw with the arrival of new ticks or at least bars, if it's created in it's init? Really, just want to understand.
Dimka-novitsek: I'm sorry, what would make the handle redraw with the arrival of new ticks or at least bars, if it's created in it's init? Really, just want to understand.
Handle is id, reference to indicator. once received and then CopyBuffer( handle,....)
Dimka-novitsek: Four thousand three hundred and two is not a string, and what's wrong with it anyway?
When the compiler issues an error, it indicates the line number and the cursor position number.
When the terminal issues an error, it indicates the error number. See the Runtime Errors section in the Handbook, and which error corresponds to the value "4302". Handle creation location is a side-issue :)
Prescribed outside all functions
Did I write something wrong in general, or where to look in general, what is wrong with it?
Handles are created in OnInit()
We get data in OnTick ()
This is an example of a standard construct.
I'm sorry, what would make the handle redraw with the arrival of new ticks or at least bars, if it's created in it's init? Really, just want to understand.
Four thousand three hundred and two is not a string, and what's wrong with it anyway?
When the compiler issues an error, it indicates the line number and the cursor position number.
When the terminal issues an error, it indicates the error number. See the Runtime Errors section in the Handbook, and which error corresponds to the value "4302". Handle creation location is a side-issue :)