Click here to Login





How to debug a trading system using the money management tool

Updated on 2012-02-06 04:40:58

Share |

Using the money management script, you can debug and trace a trading system simulation by two ways.


Steps:

- Select your trading system then click on "Update"
- Select "Money Management" tab then click on "Add a new money management script"
- Click on "Update Script" to open the money management editor

First function:

Divers.Output("the text goes to the Detailed tab in the trading system report");

Example:

int buySignals = Data.GetBuySignals().Count;
Divers.Output("Number of buy signals for the current period: " + buySignals);

Gets the number of buy signals for the current period and then displays the number in the detailed tab of the trading system report.

Second function:

Global.Trace("The text goes the output window (View -> Output)");

Example:

int buySignals = Data.GetBuySignals().Count;
Global.Trace("Number of buy signals for " + Divers.CurrentDate.ToString() + " : " + buySignals);

You can use these functions in all events of the money management script. For example, you can use the OnNewPosition event to analyze new trades.











one review (Log in)







Other how-to articles




How to calculate the average of a time series using the money management tool





How to add a metric in the trading system simulation report





How to optimize the stop limit of a trading system





How to generate buy/sell signals from a trading system





How to optimize the number of positions in a trading system





How to add custom position-based metrics to your trading system





How to download a trading item from the Sharing Server





How to set order type of a trading system programmatically





How to optimize an indicator in your trading system







QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright 2017 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.