Click here to Login





                                                   Global variables

  0

0
John Lyons
2012-09-01 22:12:07


When I run a simulation with specific variables, get the trades list, and open the chart, I have to reset the variables on the indicators for the charting.

Is there a way I can use a global variable and make the change only once?

Thanks

John



John Lyons
2012-09-02 19:58:25

  0

This may be the answere to my own question. It's from the New Release Info. several days ago.

I'll try this and see.

New "Global" event in Money Management

A new "Global" event was added to the money management script. This event is called once and it can be used to create global variables and functions to use in other events.

Example:
double barIndex = 0;

#functions#
public double Hello()
{
return 10;
}


Read more: http://www.quantshare.com/title-729-quantshare-trading-software-new-version-292#ixzz25KruGv00



QuantShare
2012-09-02 23:39:02

  0

What exactly do you mean by "I have to reset the variables on the indicators for the charting" ?




John Lyons
2012-09-19 19:00:40

  0

What I mean is...

Say I include an SMA in a simulation and optimize it with sma20, sma 50, sma 100, sma200.
Then the results seem best at 50 and I want to chart a few of the results to see that it is triggered by the pattern I had intended.
So I click on the result in the 'Trades' list to get a chart and of course it brings up a chart using my default chart, say using sma 20.
Rather than changing my default to match the simulation each time, could I set the perameters more globally to follow those I currently use in the sim?

Thanks.



John Lyons
2012-09-20 08:42:43

  0

Perhaps, my real question is,

Is it possible to get a chart that reflects the perameters used in the simulation automatically.
So updating the simulation would automatically update the resulting chart when accessed from the 'Trades' list?

Thank you

John



QuantShare
2012-09-20 10:51:00

  0

Is it possible to get a chart that reflects the perameters used in the simulation automatically.

=> Not directly. But you can check "Plot Entries&Exits on chart" to display buy and sell arrows in the selected chart.



Alpha Trader
2013-04-26 20:06:14

  0

Is it possible to plot indicators/variables in the same chart along with the arrows?


QuantShare
2013-04-26 21:30:24

  0

Create a different pane for each indicator/arrows combination.


No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Set Global Variable
CRB Global Commodity Equity Index
Global Sector Rotation Strategy V1.0
Global Market Rotation Strategy V1.4
Global Market Rotation Strategy V1.1

How-to Lessons
How to get stocks for a particular index using the global script
How to optimize an indicator in your trading system
How to run a screen or a watchlist from a script
How to create a composite index/indicator
How to automatically start a downloader every few minutes?

Related Forum Threads
AMM script global variables do not appear to be thread safe
How do I use variables in Money Management Scripts?
Best practices for using a Global Variable
How to Debug a Strategy using data variables values by day by Tic...
Set Global Variable Between Strategy and AMM

Blog Posts
QS Trading Software: Global Script
Charting & Scripts - Manage stock charts using the global script
Trading Optimization
How to Detect Potential Issues/Errors in Your Historical Data?
How to Send Commands to QuantShare from Excel or Other Applicatio...









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 © 2024 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.