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

Re: Calculating values in a specific time segment...



PureBytes Links

Trading Reference Links

Hello Shraga(Feivi-Philip),

this should get you started:

{time-defined opening channel}

Inputs: BeginCH (Sess1StartTime), ChLen(60);
{Input definitions:
BeginCH--start time of the channel used to set Hi and Lo triggers.
ChLen-the length in minutes after BeginCH.}

Vars: CH (0), CL (0), EndCH(0);
EndCH =  CalcTime(Sess1StartTime, ChLen);


{CH = channel high; CL = channel low}

IF Time = CalcTime (BeginCH, BarInterval) then Begin            {sets 1st bar H and L as trigger points}
        CH = High;
        CL = Low;
End;


IF Time >= BeginCH and Time <= EndCH then begin
     IF High > CH then CH = High;
     IF Low < CL then CL = Low;
End;
{replaces previous H&Ls  with newer H&L's if time is between 0930 and EndCh}

Condition1 = Time > BeginCH and Time <= 1615;

If {Condition1 and} Date >= LastCalcDate and Time >= EndCH then begin
        alert = true;
        Plot1(CH, "HLChBuy");
End;


If {Condition1  and} Date >= LastCalcDate   and Time >= EndCH then begin
        alert = true;
        Plot2(CL, "HLChSell");
End;


Best regards,
 Jim Johnson                           mailto:jejohn@xxxxxxxxxxx

-- 
Wednesday, October 2, 2002, 5:51:54 AM, you wrote:

SFP> Hello,

SFP> How can I have EL calculate the high or low of a specific time segment? For 
SFP> example, I'm running an intraday SP chart, but my indicator needs to know 
SFP> the high or low that the market had between 10 AM and 2 PM, and not the H 
SFP> or L of the entire day.

SFP> Can anyone think of a way to do this?

SFP> TIA

SFP> Philip