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

Re:easylanguage help



PureBytes Links

Trading Reference Links

The following code is for a Function called EntryBarHigh it will call the High
of the Entry Bar.  MarketPosition cannot be used in any statement but an If
condition as in 
If MarketPosition = 1 Then Begin ExitLong HighestHigh(5);


{ ************* Function EntryBarHigh **************}

Var: EBar(-999999);

If Barssinceentry(0) = 0 Then Begin
 EBar = CurrentBar;
end;

EntryBarHigh = High[CurrentBar - EBar];

{ **************************************************}

It can be used like this

ExitLong ("EBH Stop") EntryBarHigh - 1 point stop;
ExitLong ("EBH Target") EntryBarHigh + 5 Point stop;


____________________Reply Separator____________________
Subject: easylanguage help
Author: Barry Silberman
Date:  5/5/00 11:10 PM

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;
=====================================