PureBytes Links
Trading Reference Links
|
Hi All
I'll greatly appreciate any input!
To assist with system development I want to write AFL to do the
following:
In formula editor I'll write very basic trading system, i.e
Buy = (rule here);
Sell = (rule here);
BuyPrice = Y;
SellPrice = Y;
I'll run backtest on one or more securities with above Buy and Sell
rules.
When buy signal is encountered set Trade_equity variable to zero.
Thereafter, until Sell signal is encountered calculate Trade_equity
as Close Price[today] - BuyPrice[most recent]. Plot the Trade_equity
lines for EACH trade in a single chart from the left axis.(Left axis
= Trade_equity, Date/Time axis = Days trades remained opened).You
then should have multiple lines of different lengths that start
at 'zero'on the left axis and then diverge. Each line represents the
equity for an individual trade.
My thoughts are to use loop and iterate through bars. However I do
not know how to create and name the Trade_equity arrays for each
trade so that AB can plot them all in one chart.
I'll appreciate any input you may have.
Regards
Deon
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 11/3/2006
|