Is it possible to mark trades manually in Amibroker and have it calculate the result?

#1
Is there some built-in functionality in Amibroker 5.50.5 (this is the current stable release version) that would enable me to manually insert the buy/sell arrows into a chart, and have Amibroker backtest based on these?

I.e., for paper trading purposes, I'd like to be able to go through a chart created from historical data (for instance, during playback), manually "click" on it to designate the buy and sell points, and have Amibroker generate, from this, a trading record, trading summary and, if possible, an equity curve. The trading record would simply be the list of trades, with the direction, date, time, profit, drawdown and run-up for each. The trading summary should contain the usual info: average profit per trade and time-in-trade for shorts, longs, and overall, maximum drawdown and run-up, etc.

[I also do automated analysis; I simply find that manual inspection can occasionally be a useful adjunct to that.]

[And if AB can't do this, what about MultiCharts?]

Thanks!
 
Last edited:

trash

Well-Known Member
#5
Re: Is it possible to mark trades manually in Amibroker and have it calculate the res

Also read about custom backtest interface, custom metrics in the manual to add additional columns in the backtest table or to add custom metrics to backtest report.
 
#6
Re: Is it possible to mark trades manually in Amibroker and have it calculate the res

Thanks trash-- that's very helpful! I'll try installing the first one.

Might you happen to have the code for the second? When I viewed the video in Chrome, the section that displays the code has the LHS cut off; most of it I could figure out by comparison to Thomas's code, but not all, since I am new to Amibroker. (I also tried downloading the file, but got an error message.)
 

trash

Well-Known Member
#7
Re: Is it possible to mark trades manually in Amibroker and have it calculate the res

The code example of Tomasz Janeczko doesn't have stop and take profit included since it's just a basic example. In another code I have added those two options to automatically calculate and plot Sell or Cover after clicking Buy or Short. Also backtester adjusts automatically after choosing different Stops and TPs. Also added risk setting and custom backtest settings. So it's all possible. Another option to add would be trailing stop.
 
#8
Re: Is it possible to mark trades manually in Amibroker and have it calculate the res

The code example of Tomasz Janeczko doesn't have stop and take profit included since it's just a basic example. In another code I have added those two options to automatically calculate and plot Sell or Cover after clicking Buy or Short. Also backtester adjusts automatically after choosing different Stops and TPs. Also added risk setting and custom backtest settings. So it's all possible. Another option to add would be trailing stop.
Yes, I understand. But for the reasons you mentioned, your code offers improved functionality over Janeczko's -- so I was wondering if you might be willing to post it or PM it :). If you'd rather not, I understand.
 
#9
Re: Is it possible to mark trades manually in Amibroker and have it calculate the res

Hi trash

It will be great to use the code with stoploss etc working. Can you please share?

Also the Short & Cover features on Tomasz's formula don't seem to work; the buy & sell works of course.

Thanks