Drawing a LOGICAL line

 
I have two points: orderopenprice() and High(1). I need to simulate a Fib Retracement between these points by drawing a line from the open price thru High(1) to get price points. How can this be done?
 

idea:

OrderSelect(<orderMustBeSelectedFirst>...);
ObjectCreate(<uniqueObjectNameString>,OBJ_TREND,0,OrderOpenTime(),OrderOpenPrice(),Time[1],High[1]);
________________________________________________Xaxis, __________Yaxis ---> __Xaxis, _Yaxis

play with ObjectSet(<uniqueObjectNameString>,<ObjectPropertiesEnumerationValue>,<newValueForEnumerationValue>);

read editor docs "Object Functions", is all there...

 
mixtermind wrote >>
I have two points: orderopenprice() and High(1). I need to simulate a Fib Retracement between these points by drawing a line from the open price thru High(1) to get price points. How can this be done?

Hi Kenneth,

Check out the following link for the equation (and explanation) of a line with two known points:

http://www.cut-the-knot.org/Curriculum/Calculus/StraightLine.shtml

You can use time as your "x" coordinate and price as your "y" coordinate to form an equation from that since you know where both points are. Then you can find any point on the given line by solving for x or y.

- Tovan

 

tovan, nice site for equations. I add to my list - maths totally not my strong point.

However, i s good to play with the equations to see what gets plotted... I go do now!

Reason: