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

Re: using pushpop.dll in a strategy/system, clarification.



PureBytes Links

Trading Reference Links

The following answers a few of the questions in this thread about
window hierarchy and passing values bar-by-bar. This is an
excerpt from the Hashnums manual.

System Order

If you have multiple systems in a workspace, and are using the DLL in real time
to share data between systems, then the order the systems run in will be
important. Unfortunately, the order systems run in cannot be controlled or
obtained from Easylanguage. However, you can store a workspace with systems
that you know run in a specified order. The order the systems run in is the
order the charts were opened in. You can change this order after opening the
charts by clicking on each chart in the reverse order you want them to run in.
So the first chart you click on will be the last to run. This method for
specifying order is frought with disaster, but it is all that Tradestation
provides.

Real Time Verses Historical

Passing values between Indicators and Systems (and paintbars and showme’s) may
not work as seems. Unfortunately, Tradestation processes data differently in
real time and historically.

When testing systems historically, Tradestation calculates the two separately
not concurrently bar by bar. So if you assumed you could use the DLL to pass
bar data from a system to an indicator you were wrong. You can however pass
final or initial values or calculations from one to the other. To pass bar by
bar data you need to use the DLL file writing utilities and re-run the system
and indicator as required. So if we have one System (S1) and an Indicators
(I1). Then S1 will be run through all the data, then I1 will be run through the
data.

However, in real time, things are calculated bar by bar. So if you calculate a
value in a system on a bar you can then read that new value in an indicator.
But its not all that simple. The order things are calculated in also depends on
the order they are inserted. However,  systems are calculated before
Indicators. So if we have one System (S1) and two Indicators (I1, I2) then we
get the following:

Insert Order:   S1, I1, I2
Calculated Order:  S1, I1, I2

However:

Insert Order:   I2, I1, S1
Calculated Order:  S1, I2, I1

Looking at all the types of analyses, the calculation order seems to be:

Systems then Indicators then PaintBars then ShowMe’s

Within each similar type the order depends on the inserted order.

You can force a particular order by switching the status of individual analyses
from ON to OFF to ON. It is re-calculated in isolation. Note that if you are
doing historical testing and adding new indicators, each new addition will be
calculated when added. Only when you re-calculate all the analyses, will the
above order have an effect.