[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coding problem



PureBytes Links

Trading Reference Links

Hi Ivo,

Thanks heaps for the lead. I'll have a play with it and see how I go.

Regards,
Paul

At 05:12 PM 13/04/2005, Ivo Karindi wrote:

P> I had an idea and wasn't sure how to code it up and I was wondering if
P> someone may point me in the right direction.

P> If I type in a certain date and price (as inputs) I want to draw a
P> horizontal line from the date and price out "x" number of bars into the future

P> For example, I want to draw a horizontal line from a price (say 123.23) on
P> 1050301 (ie: 1st march 2005) out 113 bars into the future

P> where date, price and futurebars are all inputs

Something like this should work:

{ input values }
nn = 113;
pp = 123.23;
dd = 1050301;

{ Get the future date }
y = JulianToDate(DateToJulian(dd)+s);

{ Plot the trendline }
x = TL_New(dd, 0, pp, y, 0, pp);

I have not tested it in TS, but you should be able to get the idea.

Best regards,

Ivo Karindi