TrendLineCrossOver
Click the file above to Download.
NOTE: For easy import into your charts, save to some where that you will be able to remember, for example your computer's desktop. Be sure to save using .alt as the file extension.
Copy to Clipboard //TrendLineCrossOver //draw two lines on chart //righ click line, and set Name as "Downtrendhigh" and "Downtrendlow" //in the script "_" refers to line. if high>_Downtrendhigh and close<_Downtrendhigh then addsellentry endif if crossup(low,_Downtrendlow) and isSellPosition() then addsellexit endif //============================================================================ //Stochastic Divergence global lastCrossDownPrice=-1 global lastCrossDown=-1 global lastCrossUpPrice=-1 global lastCrossUp=-1 if isBeginBar() then lastCrossDownPrice=-1 lastCrossDown=-1 lastCrossUpPrice=-1 lastCrossUp=-1 endif if BarClosed() then if crossup(SlowK[0](Close, 5, 5, 5),SlowD[0](Close, 5, 5, 5)) then if closelastCrossUp then addbuyentry endif lastCrossUpPrice=close lastCrossUp=SlowD[0](Close, 5, 5, 5) endif if crossdown(SlowK[0](Close, 5, 5, 5),SlowD[0](Close, 5, 5, 5)) then if close>lastCrossDownPrice and lastCrossDownPrice>0 and SlowD[0](Close, 5, 5, 5)
Enlarge Chart