Simulate script - bugs?

Posted By: DdlV

Simulate script - bugs? - 03/30/15 04:38

Hi jcl,

There appear to be a couple of bugs or my misunderstandings happening with the Simulate script. Either way, I could use your help! laugh

1) I was trying to reconcile using my trades.csv in Simulate with the account's values. The only way I've been able to achieve this is by replacing "ThisTrade->fProfit = tProfit;" with "ThisTrade->fResult = tProfit;". Should it be fResult? If fProfit is correct, how do I reconcile? The calculated return is also very different between the two...

2) The plot produced by Simulate when clicking Result is missing the last few bars on the right side - almost as if the right Equity scale is overwriting those last bars. I've tried all the parameters I can see in the manual but none of them have caused these bars to appear. How can I get them plotted?

Thanks.
Posted By: jcl

Re: Simulate script - bugs? - 03/30/15 17:07

As to the second question, check if the price history covers the dates until the end of the simulated trades. Otherwise the plot ends with the end of the history. I can't answer the first question immediately, but I'll look into it.
Posted By: DdlV

Re: Simulate script - bugs? - 03/30/15 18:51

Thanks jcl.

Yes, the price history was not complete.

It appears that the trades in trades.csv that came after the end of the price history were ignored since the figures changed when the complete price history was in place. Can you confirm trades after the end of the price history are ignored, distorting the results? If so, is there an easy way to fix this? Or at least modify Simulate to print a message advising of the problem?

Thanks.
© 2024 lite-C Forums