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

[amibroker] Re: backtest / equity curve



PureBytes Links

Trading Reference Links

Hi Edward,

You can keep track of your daily gain and when that reaches your 
threshold block your buy and short signals. For instance you might 
use buyPrice and sell price to calculate gain / trade that keep gain 
in its own array or static var, I prefer the latter, and just bump 
the gain each time a trade is complete. 

buy = buyCondition and gain < threshold.

This way the back tester never sees the additional or potential 
trades and will give you better results. Also in back testing if you 
use buyPrice, etc., if you are using conditions that occur mid bar, 
such as MA cross, then the back tester gives more accurate results. I 
had to use explore and dump that to excel to finally get the back 
tester to give correct results. Using close of the bar give incorrect 
results.

Barry

--- In amibroker@xxxxxxxxxxxxxxx, "Edward Pottasch" <empottasch@xxx> 
wrote:
>
> hi,
> 
> anyone ever do a backtest on intraday data to exit trading for the 
day when a certain profit is achieved? In the chart below the 
intraday profit / loss curve is shown. I guess I could put this data 
in a composite and use the compositie during a more detailed 
backtest. Still the coding is pretty difficult since when the daily 
profit is achieved you want the backtest to continue for the next day 
of intraday data. 
> 
> Another way to test it would be to just analyze the data below. For 
instance if +1000$ is achieved intraday jump to the next day, if not 
take the profit/loss value at the close and just add these value. Not 
so easy to program or have I been drinking too much liquor lately?
> 
> Wonder if anyone solved this problem or sees the solution?
> 
> thanks, Ed
>



------------------------------------

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/