I am experiencing an issue with the back test settings reverting to trading on the OPEN when I close; then reopen AB. Since I am using monthly bars and trade on the "CLOSE", this is causing errors in my back tests. I then have to manually reset the trade to "CLOSE".
Secondly, I am seeing SHORT trades even though I have the program set to trade LONG only.
Any suggestions as to what I need to do?
Just set the entry and exit prices inside your AFL, which will override the Analysis Settings:
BuyPrice = SellPrice = ShortPrice = CoverPrice = Close;
This is the same as:
BuyPrice = Close;
SellPrice = Close;
ShortPrice = Close;
CoverPrice = Close;
We have no way to answer your question about Short trades without seeing you Settings and your code.
Like mentioned above, just write the settings in the AFL. I find it easier to track.
Other option is you save the backtest analysis window. It will save as a .apx file. Then you can load that .apx file and the settings will be the same as saved. Easy enough to open it daily by going to file, recent files, open it up.
I had the code in the program. I reloaded the code; set the trade price manually and ran the test successfully. Closed AB and reopened it; then ran the test. By closing and re-opening AB, the trade price was reset to Open, where the test ran incorrectly.
The older version of AB would hold the settings. I will try the .apx file.
Thanks to all
Actually it holds LAST USED settings if you just open new Analysis window.
But it is easy to get fooled yourself if you change the settings and don't remember what last was used. Therefore it is easier and way more reliable to save your Analysis project as APX file that holds EVERYTHING, including formula AND settings.