Click here to Login





                                                   Dynamic Symbol Using CompareAssets()

  0

0
ymlee
2015-04-04 01:23:28


I just download CompareAssets() script and put it in the chart window, but I don't want to be hardcoded.
I try the coding using Name(), but it didn't work, can anyone help me on this?

//p = CompareAssets("6868.HK;.HSI;.SPX;", "01/01/2015"); // OK
p = CompareAssets(Name()+";.HSI;.SPX;", "01/01/2015"); // Not working

plot(p, "CompareAssets", colorBlack, ChartLine, StyleOwnScale);



ymlee
2015-04-04 03:14:47

  0

Best Answer
I found it myself, the correct method is

p = CompareAssets(Name().";.HSI;.SPX;", "01/01/2015");



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
Stock market prediction using traderbots
Symbol Information on Chart
VIDYA - Variable Index Dynamic Average
Market Volatility - Composite Indicator using Stocks Standard Dev...
Industry Name of an External Symbol

How-to Lessons
How to quickly add a ticker symbol
How to get stocks for a particular index using the global script
How to create a volatility-based Stop - Dynamic stop based on the...
How to plot a stock using different periods in the same chart
How to calculate the average of a time series using the money man...

Related Forum Threads
Symbol Management using C# scripts
Dynamic crossOver point using HhvLlv
STATIC WATCH LIST-add a symbol to existing static watch list from...
Symbol Information
Equity to Symbol - AMM / Script

Blog Posts
Download Trading Data using the URL-Script
Create a trading strategy using the money management tool - Part ...
Dynamic Position Sizing in your Trading System
How to Create a Custom Real-Time Table using QS Trading Software
Backtesting trading strategies using intraday data









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.