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

RE: Donchian



PureBytes Links

Trading Reference Links

Input: LEntryL(20), SEntryL(20), LExitL(10), SExitL(10);

If Currentbar >1 Then begin
	If Close > Highest(High,LEntryL)[1] Then Buy 100 shares on Close;
    If marketposition(0) = 1 then ExitLong Lowest(Low, LExitL) stop;
	If Close < Lowest(Low,SEntryL)[1] Then Sell 100 shares on Close;
    If marketposition(0) = -1 then ExitShort Highest(High, LExitL) stop;

End;