Download MetaTrader 5
To add comments, please log in or register
All Code Base apps are available from MetaTrader 5. You can publish your own one!
bdwezensky 2010.07.30 19:08 

1.#J - Strategy Tester Result Codes and Stock Split Compensation


When using the strategy tester the result code of 1.#J frequently appears in the results column of the optimized results and in the journal file. 


What does this mean?

Is it possible to get more detailed results?


Stock splits on the CFD charts are not shown on an adjust scale and thus hard to program into an EA that could run on the strategy tester. 


How could this be compensated for in the EA?

Bogdan Caramalac
Bogdan Caramalac 2010.07.30 22:34  
Good question... The number of shares of your position should get multiplied by the reverse. If the stock splits to half, the number of shares should suddenly become double. One way to cope with this in an EA would be to know when they happened, close the trade, then reopen after. However, it would be too unprofessional. MT has a bar history. It doesn't have an event history to tell about splits or mergers. I wonder how TradeStation deals with this. It also doesn't have a corporate history - to know at least profits, capital, debt and dividends for a given year. I've seen corporate data in Reuters Xtra - this seems to me very far from the purpose of MetaTrader. However, at least for stocks, there should be some extra data in the history to cope at least for splits and mergers, that's for sure.
bdwezensky 2010.08.02 15:58  

If you view price history on Google Finance or Yahoo Finance you see the price history is adjusted to account for the stock splits.  There is a symbol on the chart to mark the event.  The advantage to this is that the price history looks continuous and with out big gaps for your EA to make decisions from.  Currently with the large gap from the split or merger as compared to say a simple moving average results in an incorrect buy or sell decision.

To add comments, please log in or register