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

ellipse code



PureBytes Links

Trading Reference Links

Here is some simple indicator plot ellipse code I put together, if anyone is
interested. It is very close to the result of the TS S-R arc tools, but a
tad off, largest at 45* angles. Not quite sure why, or which one is wrong.
(I lost most of my trig core knowledge one new years eve in the 90s. :-) ) A
decent starting point anyway. I understand that ts 8.1 will permit 99 plots
in an indicator, fyi.

Best,
Chris

//--------------------------------------------
This is incomplete but you get the idea.

//idx is a linear index that ranges 0-1 for bars in circle
//centerprice is the price midpoint
//radius = radius vertical at highest point

value3=sine(idx*180);
if value3>0 then begin
plot1(centerprice+radius*squareroot(value3));   //top half
plot2(centerprice-radius*squareroot(value3));  //bottom half
end;