Click here to Login

                                                   Price reference from Money Management Script


Dennis Schutten
2020-08-24 19:45:17


I would like to use a price reference to another symbol for position size calculation. What would be the correct syntax for this?



2020-08-25 11:54:32


Hi Dennis,

You can use this:
a = getseries("Symbol", close);

Dennis Schutten
2020-08-26 07:00:17


I get a error while using this?

string a=getseries("Symbol",close);

2020-08-26 12:05:47


This is a QS language formula so, you should not use "string a"

a = getseries("GOOG", close); // To get the close time series of GOOG stored in variable "a"

Dennis Schutten
2020-08-26 12:51:03


Thank you...

If I understand correclty this will return a array? I would need the close of the date processed, only that.

2020-08-30 09:28:42


Everything returns an array/vector in QS language. Please read this:

In the "getseries", see how I specified "close" in the second parameter. You can plot the "a" variable on a chart to have a visual confirmation.

a = getseries("GOOG", close);
plot(a, "", colorGreen);

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
Money management to Reject Trading Positions Based on their Past ...
Averaging Down Money Management Strategy
Withdraw a Fixed Amount Every Month - Money Management
Investing in stocks using the Kelly criterion money management st...
Return per Bar Stop - Money Management Strategy

How-to Lessons
How to calculate the average of a time series using the money man...
How to run a screen or a watchlist from a script
How to debug a trading system using the money management tool
How to generate buy/sell signals from a trading system
How to get trading orders from a portfolio programmatically

Related Forum Threads
Money Management script and exit options in the wizard
Can a Money Management script access a custom function?
Reuse optimization parameters from Strategy script in Money Mgmt
Get the Previous N bar Date/DateTime in Money Management script
Advance Money Management Script debug.

Blog Posts
Basic trading system implemented using the money management tool
Create a trading strategy using the money management tool - Part ...
How to filter quotes data from high and low price spikes
Several money management strategies in a trading system
Create a trading strategy using the money management tool - Part ...

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

Copyright 2023
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.