Sorry, I messed up, I wrote it by hand, in the original tm=ObjectGet(" VerticalLine ",0); so something doesn't work
if(ObjectFind("VerticalLine")!=-1){
datetime TimeVL=ObjectGet( "VerticalLine", OBJPROP_TIME1); //получили координату времени где стоит вертикальная тиния с именем VerticalLine , которая сознательно выставлена - так как не проверяется какая это линия и тд int shift=iBarShift(NULL, 0, TimeVL); //получил смещение линииот текущего момента в свечах //int c=Bars- shift; //если вдруг хочется до конца истории вывести значение индикатора (после линии)int c=10; // а это на скольких свечах после вертикальной линии анализировать значение индикатора
for(int i=shift; i<=shift+c; i++){
//double x=iCustom(NULL, 0, "СвойИндикатор", ..., int mode, i); // тут вроде как свой индикатор ....double x= iMA(NULL, 0, 12, 0, MODE_SMA, PRICE_CLOSE, i) ; // для примера вывод МА
Print("x=",i," MA=",x);
}
}
elsePrint("Нет Вертикальной линии");
- Be careful - the code will work tick by tick - you will get a lot of data for analysis :) on every tick the code is executed anew
vilard: In MQL, is it possible to make a binding to an indicator colour? I.e. when the indicator colour or indicator point changes, a position is opened.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Help with the code. We have a chart with an indicator with a buffer and a vertical line shifted to the past.
How to read from the indicator buffer values from the bar on which the vertical line is located to the end of the chart (zero bar)?
I wrote it like this:
tm=ObjectGet("VerticalLine",0);
for(x=iBarShift(Symbol(),0,tm);x==0;x--)
{
Print(x);
Print(Buffer[x])
}
It doesn't work, nothing is output at all. Help
I write it like this:
tm=ObjectGet("VerticalLine",tm);
for(x=iBarShift(Symbol(),0,tm);x==0;x--)
{
Print(x);
Print(Buffer[x];
}
The problem must be in the line: tm=ObjectGet("VerticalLine",tm);
Read the Help, it needs something like: tm=ObjectGet("VerticalLine",OBJPROP_TIME1);
the problem must be the line: tm=ObjectGet("VerticalLine",tm);
Sorry, I messed up, I wrote it by hand, in the original tm=ObjectGet("VerticalLine ",0); anyway, it doesn't work
Sorry, I messed up, I wrote it by hand, in the original tm=ObjectGet(" VerticalLine ",0); so something doesn't work
- Be careful - the code will work tick by tick - you will get a lot of data for analysis :) on every tick the code is executed anew
That is, if I understood correctly what you want
In MQL, is it possible to make a binding to an indicator colour? I.e. when the indicator colour or indicator point changes, a position is opened.
Yes
how can this be implemented, if possible a simple example or code link
how can this be implemented, if possible a simple example or code link
https://www.mql5.com/ru/search?keyword=iCustom
https://www.mql5.com/ru/code/9235
https://www.mql5.com/ru/search?keyword=iCustom
https://www.mql5.com/ru/code/9235
thank you
Hi all!
I'm asking a knowledgeable person to tell me what the libraries in MQL4 are and what to use them with. Thank you in advance.