Dear all,
If we draw a trend line, and then want to open a position when the market price crosses the line, is it posible?
If it's possible, is there someone can help how big picture of the algorithm. Thank you very much.
If you are checking to see if the TL is crossed on the current bar you need to know the price of the TL for the time of the current bar, you can either calculate this by doing a simple linear regression . . . or use this function: ObjectGetValueByShift()
Thank You RaptorUK.
I will try it.
If we draw a trend line, and then want to open a position when the market price crosses the line, is it posible?
If it's possible, is there someone can help how big picture of the algorithm. Thank you very much.
- Loop through all objects and find the trend line name the user created, or have the EA create a named trendline that the user moved.
- Get value by shift and compare to price, or get shift by value and verify that the shift is inside the trendline start to end.
- Loop through all objects and find the trend line name the user created, or have the EA create a named trendline that the user moved.
- Get value by shift and compare to price, or get shift by value and verify that the shift is inside the trendline start to end.
Thank you Mr. WHRoeder and Mr RaptorUK for your attention
I have another question
To draw the best Trend line based on Price Bar in a period, is there a standard function for do it ?
If there is no standard function for doing it, is it possible to calculate the gradient line first, and then draw the best line using ObjectCreate_OBJ_TRENDBYANGLE ?
Or, is there another method that is often used to solve problems like this ?
Is there someone who can help me ?
Thank you very much.
Dear all,
If we draw a trend line, and then want to open a position when the market price crosses the line, is it posible?
If it's possible, is there someone can help how big picture of the algorithm. Thank you very much.
Thank you Mr. WHRoeder and Mr RaptorUK for your attention
I have another question
To draw the best Trend line based on Price Bar in a period, is there a standard function for do it ?
If there is no standard function for doing it, is it possible to calculate the gradient line first, and then draw the best line using ObjectCreate_OBJ_TRENDBYANGLE ?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear all,
If we draw a trend line, and then want to open a position when the market price crosses the line, is it posible?
If it's possible, is there someone can help how big picture of the algorithm. Thank you very much.