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

Re: EL Question about Real Time



PureBytes Links

Trading Reference Links

At 9:07 PM -0800 3/18/02, mike@xxxxxxxxxxxxxxxxx wrote:

>I need to know while my strategy is running, if the data I am dealing with
>is the historical data that comes into the strategy when the strategy first
>starts or IF on the other hand I am actually seeing the tick by tick real
>time data.

<snip>

>Actual execution of trades should only happen in real time. My DLL
>interfaces to the Globex computer and I want to place trades ONLY when I
>know my strategy is getting the latest quotes. This will prevent executing
>trades based on the initial historical data coming into the strategy when
>the strategy starts up.

The LastCalcTime, and LastCalcDate functions will return the the time
and date of the last bar on the chart and these values are valid on
the first bar of the chart.

So I would think that you could save their values on the first bar
and then check to see if the time and date of a trade are before or
after those values.

if CurrentBar = 1 then begin
    SaveTime = LastCalcTime;
    SaveDate = LastCalcDate;
end;

if Date > SaveDate and Time > SaveTime then ...

Hope this helps.

Bob Fulks