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

easylanguage help



PureBytes Links

Trading Reference Links

Can anyone explain why MP[1] is not working in the following code.  I'm
trying to lock in the high on the entrybar only, but MP[1] is not working so
that Value1 is constantly showing "0".    I have used expert commentary to
observe that  MP[1] never changes in TS 2000i.

Thanks in advance for any insight.

Barry

=================================
Variables: MP(0), Count(0);

MP = MarketPosition;

If MP = 1 and MP[1] = 0Then
Value1 = High;

If MP = 1 and BarsSinceEntry >= 1 Then Begin
If Close > Value1 Then
Count = 1
Else Count = 0;
If Count = 2 Then
ExitLong on Close;
End;
=====================================