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
Hi all
Hopefully an easy for the programmers out there but something I cannot figure out.
I want to be able to manually draw a non-horizontal trend line on a chart and then use the value of that line that corresponds to the current time.
For example, a line is drawn below a typical flag setup and named "MyLine". I want to know the value of the line at the current time so that I can write an EA to sell when the price closes below that value.
This code returns a 0:
LowerLine = ObjectGet(MyLine, OBJPROP_PRICE);
This code returns the start price of the line:
LowerLine = ObjectGet(MyLine, OBJPROP_PRICE1);
This code returns the end price of the line:
LowerLine = ObjectGet(MyLine, OBJPROP_PRICE2);
How do I return the current price of the line?
Regards,
Krooza