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

Trendline, in over my head



PureBytes Links

Trading Reference Links

All,
Attempting to figure out how to use the slope between two past points 
and then buy when the slope between the farthest point and the 
current close becomes less than the slope between the original two 
points, I'm not getting any errors, just not getting anything at 
all. Thought maybe there was an obvious problem.

Thanks for reviewing this and before you ask,
I never finished high school so the slope equations etc... could be 
wrong.

Thanks
Bill Baker
Filter=TimeNum()>=080000 AND TimeNum()<=150000; 
PositionSize=2500;
s=Peak(Close,.01,3);
t=Peak(Close,.01,2);

slope=(t-s)/(BarsSince(s)-BarsSince(t));
slope2=(C-s)/BarsSince(s);
test1=slope2>slope AND s>t; 
Buy=Filter AND test1;
Sell=TimeNum()>150000;


Short=0;
Cover=0;