Click here to Login

                                                   Best practices for using a Global Variable


Obuli Govindaraju
2012-02-23 08:01:19

When a global variable is set does it stay in memory until Quantshare program closes?

What is the best practice on using a global variable, should a global variable be deleted after its use to save memory?

2012-02-23 10:51:07


Best Answer
Yes, it stays in memory until QuantShare closes.

You don't have to delete a global variable unless you are storing big amount of data (Example: Several arrays)

No more messages


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"


Trading Items
Set Global Variable
The Best trading rules for the ADX technical indicator
VIDYA - Variable Index Dynamic Average
Average Stock Performance for each U.S Exchange
ADX Composite Indicator for the Stock Market

How-to Lessons
How to get stocks for a particular index using the global script
How to calculate the average of a time series using the money man...
How to debug a trading system using the money management tool
How to download historical EOD data for penny stocks
How to optimize a neural network using a genetic algorithm

Related Forum Threads
Set Global Variable Between Strategy and AMM
Set Global variable and running calculation Functions in MM scrip...
Using Seaborn Python Package for Creating Heatmap
Intraday Variable for 'Entry Bar' and 'First Bar Of Day'
Best way to precompute a custom formula and store it

Blog Posts
How to Select the Best Market Indicator for your Trading System
Charting & Scripts - Manage stock charts using the global script
How to Download Trading Data for Certain Securities Only
QS Trading Software: Global Script
Select the best ETFs combination to maximize your return and redu...

Create an account
Affiliate Program
Contact Us
Trading Forum
How-to Lessons
About Us
Terms of Use

Copyright 2017
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
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.