PureBytes Links
Trading Reference Links
|
I'm trying to determine how to display trailing stops on a graph.
Right now I have them listed in the title, is there any way to
actually overlay them graphically?
Automatic analysis:
Buy = Cross( StochK(),StochD());
Sell = Cross( StochD(), StochK());
Cover = Cross( StochK(),StochD());
Short = Cross( StochD(), StochK());
Indicator builder:
Graph1 = StochD();
Graph0 = StochK();
diff = StochK()-StochD();
diff1 = IIf( diff>0,diff, 0 - diff);
diff2 = diff1 * 3;
Graph2 = diff2;
bsu=BarsSince(Cross(StochK(),StochD())); /*bars since up cross*/
bsd=BarsSince(Cross(StochD(),StochK())); /*bars since down cross*/
lv = HHV(Close, bsu); /* high value since buy */
sv = LLV(Close, bsd); /* low value since short */
Lstop = lv - (lv * .04); /*4% stop*/
Sstop = sv + (sv * .04); /*4% stop*/
Title=Name() + "- Stochastic Slow - Difference=" + WriteVal(diff1)
+ "; 4% Long Stop=" + WriteVal(Lstop) + "; pds = " + WriteVal(bsu)
+ "; 4% Short Stop=" + WriteVal(Sstop) + "; pds = " + WriteVal(bsd);
|