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

EL Question about Real Time



PureBytes Links

Trading Reference Links

I am assuming by everyone's lack of response on this subject that no one
knows a better way for a strategy to know when it is dealing with real live
price values as opposed to historical price values in the strategy
evaluation. I have shortened the detection part as follows:

{set up here to make sure that trades are placed in real time and not
historically}
If (SaveTime = 0) and (Date >= CurrentDate) and (Time >= CurrentTime) Then
SaveTime = Time;
If (SaveTime > 0) and (Time > SaveTime) Then IsRealTime = 1;

{if we have live data so do my dll function}
If (IsRealTime > 0) then RetCode = MyDLLFunc(Close, High, Low, PosNum);

Mike.

-----Original Message-----
From: mike@xxxxxxxxxxxxxxxxx [mailto:Mike@xxxxxxxxxxxxxxxxx]
Sent: Saturday, March 16, 2002 11:18 PM
To: OMEGA LIST
Subject: EL Question about Real Time


Have a question about EasyLanguage:

Is there a property or function that I can access in EL that will tell me
that the strategy is looking at the latest quote rather than a quote in
history?

I thought of doing it this way but it sure seems awkward:

Vars: SavTime(0), ItIsRealTimeNow(0);

{GET CAUGHT UP TO THE REAL TIME MINUTE}
If (Date = CurrentDate) and (Time = CurrentTime) Then begin
      SavTime = Time;
end;

{NOW SET TO GO AT NEXT MINUTE}
If (Time > SavTime) and (SavTime > 0) Then Begin
      ItIsRealTimeNow = 1;
end;

{OK NOW THE PART OF MY STRAT THAT NEEDS TO KNOW DOES THIS}
If (ItIsRealTimeNow > 0) Then Begin

	{DO MY THING WITH MY DLL FUNCTION}

end;

Thanks,

Mike.