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

[no subject]



PureBytes Links

Trading Reference Links

Thanks Gary,

Adding the "1 contract" took care of the multiple exits, but also stopped all exits after the first as well. To correct that I added a > in the "If BarsSinceEntry >= Length Then" line.
Looks like it works well.

Thanks for the help.

Joe

Input: LEConsec(3),SEConsec(3),Length(1);


IF MRO(Close <= Close[1],LEConsec,1) = -1 Then Buy("LCC") 1 contract on Close;
IF MRO(Close >= Close[1],SEConsec,1) = -1 Then Sell("SCC") 1 contract on Close;


If Marketposition <> 0 then begin

If BarsSinceEntry >= Length Then
	Exitlong ("ExitLong") from entry("LCC") 1 contract total This Bar on Close;


If BarsSinceEntry >= Length Then
	Exitshort ("ExitShort") from entry("SCC") 1 contract total  This Bar on Close;

End;




> IF MRO(Close <= Close[1],LEConsec,1) = -1 Then Buy("LCC") on Close;
> IF MRO(Close >= Close[1],SEConsec,1) = -1 Then Sell("SCC") on Close;

You didn't specify a position size here.  Did you intend to?

> If BarsSinceEntry = Length Then
> 	Exitlong ("ExitLong") from entry("LCC") 1 contract This Bar on Close;
> If BarsSinceEntry = Length Then
> 	Exitshort ("ExitShort") from entry("SCC") 1 contract This Bar on Close;

"..1 contract total" -- try that.

Gary