I have written a script that will buy, scale in, and sell. It looks great on the chart. The scale in, or (Pyramiding) does not reflect on the backtest. Lets assume the script is okay. Is there anything else I would need to do in the app in order for this to work properly? Thanks
Prime principle: NEVER assume that the formula is OK.
If something doesn't work, then the reason is IN YOUR formula.
Therefore to get ANY help you have to send the formula.
To get better understanding of what is happening in your code and how functions work, use advice given here: How do I debug my formula?
Thank you for the response, the reason i stated to assume the script is okay is because I was curious if there is anything in the app, such as switches or settings, that I may have missed or just do not know about. Thanks again for the response
to see the trades in detail you need to change the Analysis settings from "Trade list" to "Detailed Log",
see:
To expand on what @empottasch said, you need to understand that when you enter a trade for AAPL and then later scale in to that AAPL trade, AmiBroker creates only one trade and in the regular trade list you will only see one row for the AAPL trade. The Scale In/Out column will tell you how many scale ins and scale outs you've done.
... but Detailed log WILL show each scale in and scale out.
This is all explained in "how do I debug my formula" link I given.
You can plot in your chart where you scaled in, to debug your code:
Plot(Buy == sigScaleIn,"ScaleIn",colorRed,styleOwnScale);
Thank Armin - Helpful!