PureBytes Links
Trading Reference Links
|
> > Thanks to everyone who replied. I'm pretty close now but it gets
> > stuck on the MaxHighTrade expression. I tried MaxPositionProfit but
> > the system gives no trades at all.
> >
> > How does MaxHighTrade translate into 2000i?
It's a user function. It returns the highest high during the
life of the current trade. Not sure who originally wrote it.
{Function: MaxTradeHigh}
Variable: MP(0);
MP = MarketPosition;
If MP <> 0 Then Begin
If MP <> MP[1] Then
MaxTradeHigh = High
Else If High > MaxTradeHigh[1] Then
MaxTradeHigh = H;
End
Else
MaxTradeHigh = -999999;
BTW are you sure that code is right? I assume that "LStop" code
is intended as a trailing stop, since it looks like one for a
long position. But the code for shorts is identical, which seems
mighty odd. I would think the short entry should initialize a
var Sstop to 999999, and then update it with something like
Sstop = Minlist(Sstop,MinTradeLow+Giveup);
Gary
|