PureBytes Links
Trading Reference Links
|
Yesterday, I wrote to publicly thank Robert Linders for
generously sharing his DLL. In that message I mentioned
that one useful application for the PushPOP is to combine
equity curves. I've had a surprising number of private
messages asking for more detail.
Rather than sending many private messages, I thought it
might be helpful to post this to the list as an
aggregated response to the several people who asked. I
hope the list doesn't mind; furthermore, I apologize for
the less than personal replies to everyone who wrote me.
I hope what follows covers what each person was curious
about.
You'll find Robert's PushPOP dll and description at Colin
West's website (thanks to Colin as well for this valuable
service!)
http://traders2traders.com/code&overviews/pushpop.htm
Robert's explanation on that page is very thorough and
helpful. When you unzip the download file, make sure to
copy both the Pushpop.dll and the c55runx.dll to your
Omega Program directory.
I will proceed from here with a simple example of
combining the equity curve of two different systems. It
should be fairly straightforward to extend this to as
many as you like. (My assumption is that these are
independent signals and trades.)
For this case, you'll need three charts in the workspace.
The first two will contain data from the market you are
trading with the strategy/system applied to its
respective chart. I'll say ES and NQ are chart 1 and
chart 2. In your EasyLanguage code for each of these
applied systems, you'll need to add something like the
following:
{Push Profit Results to indicator************}
Inputs: ReferenceNr(56);
DefineDLLFunc: "PUSHPOP.DLL", VOID, "PUSH", LONG,
LONG, LONG, DOUBLE;
DefineDLLFunc: "PUSHPOP.DLL", VOID, "PUSHCLEAN",
LONG;
If currentbar=1 then PushClean(ReferenceNr);
PUSH(ReferenceNr, DATE, TIME, NetProfit);
Essentially, this pushes the equity curve outside of this
chart and makes it available for use elsewhere, i.e.
globally. You can push any number of things out of the
chart, using different ReferenceNr's. I'll talk later
about how this might be useful.
After you have your two charts, ES and NQ pushing equity
out for use, you'll need a third chart, into which you'll
"POP" those results.
You can create a third chart with anything as data1, as
long as you have enough of a time period of historical
data and intraday detail, if you are using that in chart
1 or 2. Usually, the same data from either chart 1 or
two will work nicely. Plot this and designate it as
"hidden."
Create an indicator in the PowerEditor. Your code will
look something like this:
Inputs: System1(56),
System2(57);
{Numbers and names at your discretion here, just make
sure to match the RefNumbers you've chosen for the
"PUSH" values in your systems}
DefineDLLFunc: "PUSHPOP.DLL", DOUBLE, "POPLAST", LONG,
LONG, LONG;
DefineDLLFunc: "PUSHPOP.DLL", DOUBLE, "POP", LONG, LONG,
LONG;
Vars: EQT(0);
EQT=POPLAST(System1,DATE,TIME)+POPLAST(System2,DATE,TIME);
Plot1(EQT,"Net Equity",Yellow,Default,1);
Insert this indicator on your chart 3, and voila, you
have the aggregate equity plot of multiple systems.
If you want to incorporate position sizing or money
management into this indicator, you could PUSH your entry
signals and marketposition size times price for equity
already committed into that third chart and make whatever
evaluations you want in the indicator. Instead of adding
the NetProfit, you'll need to PUSH the trade profit and
add the results (or multiples of the result for position
sizing) of those trades which you took.
As you can see, the possibilities are numerous for the
many different uses of Robert's .dll.
--
Dave Nadeau
Fort Collins, CO
|