You'll find your answer in here.
PS - probably best not to double post, people don't like it ;-)
i was already following this article.... but they not tell everything there...
to simplify the conversion i did these functions.. im not experienced enough to see if these are the best commands for indicators could you tell about ?
-----------------------------
-----------------------------
-----------------------------
double _open(int index)
{
if(index < 0) return(-1);
double Arr[];
if(CopyOpen(_Symbol,_Period, index, 1, Arr)>0) return(Arr[0]);
else return(-1);
}
double _low(int index)
{
if(index < 0) return(-1);
double Arr[];
if(CopyLow(_Symbol,_Period, index, 1, Arr)>0) return(Arr[0]);
else return(-1);
}
double _high(int index)
{
if(index < 0) return(-1);
double Arr[];
if(CopyHigh(_Symbol,_Period, index, 1, Arr)>0) return(Arr[0]);
else return(-1);
}
double _close(int index)
{
if(index < 0) return(-1);
double Arr[];
if(CopyClose(_Symbol,_Period, index, 1, Arr)>0) return(Arr[0]);
else return(-1);
}
datetime _time(int index)
{
if(index < 0) return(-1);
datetime Arr[];
if(CopyTime(_Symbol,_Period, index, 1, Arr)>0) return(Arr[0]);
else return(-1);
}
int _bars(){
return Bars(_Symbol,_Period);
//int teste = Bars(_Symbol,_Period);
}
double _bid(){
//double Ask=SymbolInfoDouble(_Symbol,SYMBOL_ASK);
return SymbolInfoDouble(_Symbol,SYMBOL_BID);
Forum on trading, automated trading systems and testing trading strategies
I strongly suggest you to do some searches before creating new topics.
Your questions have been asked and answered numerous times.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
these variables are not available on mql5
what function can i construct to better emulate these Open[0] High[0] Low[0] Close[0] ?