Click here to Login




How to debug a trading system using the money management tool

Updated on 2012-02-06





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 comment (Log in)

Back







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 © 2012 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items