sorasit46:
Linear interpolation or use ObjectGetValueByShift()
When drew trend line by --> ObjectCreate("Trendline",OBJ_TREND,0,Time1,Price1,Time2,Price2) .
How to read price at time 3 ?
with these functions:
int iBarShift( string symbol, int timeframe, datetime time, bool exact=false)
double ObjectGetValueByShift( string name, int shift)
iBarShift changes time to bar nr., use this as "shift" in ObjectGetValueByShift.
when you know the trendline parameters you can calculate the trendline value at any point like this:
price_at_any_point = TLprice2-(TLprice2-TLprice1)/(TLshift2-TLshift1)*any_point_shift;
szgy74:
correction: you don't need iBarShift
Thank you
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
When drew trend line by --> ObjectCreate("Trendline",OBJ_TREND,0,Time1,Price1,Time2,Price2) .
How to read price at time 3 ?
thank you