datetime dt = (datetime)ObjectGetInteger(ChartID(), "trendline_name", OBJPROP_TIME, 1);
thanks for your help...but sorry am not a programmer iv change your code to
datetime dt = (datetime)ObjectGetInteger(ChartID(), "ObjName", OBJPROP_TIME, 1);
some time when i change the value
extern double Barsahead
and i get a date of 2024.06.02 10:01....
from the terminal the result is in yyyy.mm.dd hh:mm with an extra menute (10:01) ...but am using a H1 chart only
as when i insert 90 for Barseahead which extend the horizontal trend line outside the range of existing bars
you can tray it
int xxx=Barsahead+Barsahead*PeriodSeconds();
This line is meaningless. Barsahead is in units of bar count. While PeriodSeconds is in seconds unit.
If you are using AI generative code please don't... You should study well organized handbooks if you want to learn coding.
If you are using AI generative code please don't... You should study well organized handbooks if you want to learn coding.
hi and thanks for your help ....this line of code was giving to me by a group member ..and before the use of AI code generation ^-^.
some times i think about learn coding but because i dont have enough time and at the same time my code is simple and not requierd deep understanding of coding i went over the internet to find a solution for any problem about that .
thanks for your help
Anyway I couldn't understand your problem and what output you expect.
hi
thanks for your kindness in trying to help me ..i appreciate ....and sorry for my weak English which cause this misunderstanding .
i attached a pic which explain the problem ...and i will tray to solve it as i think the problem is emerging from this line
int xxx=Barsahead+Barsahead*PeriodSeconds();
as you said ;
Barsahead is in units of bar count. While PeriodSeconds is in seconds unit.
thanks very much
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi
i have a simple indicator which draw a trend line horizontally and to the right , can we get the date of the t2 for that trend line using any code? (even if the trend line extended out the range of the trading bar)?
as in the attached pic