Click here to Login





                                                   Value not initialized

  0

0
crfaldu
2017-01-13 17:16:40




RS = RS[1] + roc(1);

Plot(RS, 'SPY', colorBlack, ChartLine, StyleSymbolNone);

is giving error value not initialized

How can I fix this . Eventually I want to code a variation of Onbalance volume.

Thanks,




QuantShare
2017-01-14 03:52:04

  0

"RS" is not defined yet. You cannot use "RS[1]".
It looks like you want to add the "roc(1)" value for each bar.

Use this instead:
rs = sum(roc(1));



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
Foreign Exchange Value of the Dollar - Nominal Indexes
Value At Risk Measure
Highest and Lowest value over a dynamic period
PREV - Previous value of the same formula
Set the First Trading Bar Values to Not a Number

How-to Lessons
How to quickly select stocks based on the last value of a databas...
How to detect whether price movements are predictable or not
How to plot a time-series that do not update the chart scale
How to filter stocks in a market composite
How to plot two different time frames in the same chart

Related Forum Threads
Default Value in Optimization
AMM script global variables do not appear to be thread safe
Replacing value for the last 100 bars (end of day data)
Tiingo EOD data not working properly
STOP/Profit targets based on the indicator value at the time of e...

Blog Posts
Programming skills are not that important
Troubleshooting a Trading System
Optimization in the statistical data analysis tool
How to Display the Year-to-Date Excess Return in a Pivot Table
Learn How to Create Your Own Technical Analysis Indicators









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.