Click here to Login





                                                   Indicator - forward bar value

  0

0
User
2011-02-02 06:02:39


Hello,

I would like to create an indicator that will be able to compute and display forward values (no need to rely on forward bars to compute forward values, only past chart bars will be used)

That is, if I select a bar on the indicator chart, the indicator will be able to adapt its forward values based on an algorithm and display them.
Is it possible ?
I understand that the vector result stores the calculated past values.
Is it possible to set negative index in result for forward values ?

Thanks for any help you could provide.



QuantShare
2011-02-02 08:59:20

  0

Can you please provide an example or maybe more explanation about "forward values".


User
2011-02-02 09:12:24

  0

OK.
Forward bar values could be anything.
For example, suppose I just want to plot forward a prediction vector calculated by an algorithm based on past prices.
This algorithm could be an auto-regression model that could be used to predict future values of a timeseries.

So when I select a bar on my price chart I want the indicator to plot these predicted values forward, that is starting just at the right from where my selected bar stands.



QuantShare
2011-02-02 09:53:56

  0

If you want to interact with a chart, then you should create a custom drawing tool (Tools -> Custom Drawing Tool)

When the drawing tool is selected and each time you click on a chart, the item script will be executed. Inside the script, you can get close, open, high, low series, perform calculations and draw lines, text, symbols...



User
2011-02-02 10:17:16

  0

Ok thanks.
I will try using custom drawing tools.



QuantShare
2011-02-02 10:29:49

  0

Let me know if you need any help


User
2011-02-03 05:00:12

  0

In custom drawing tools it is easy to get for example a close timeseries :
double[] close = Functions.ChartData.GetTimeSeries("close");

Is it possible to get a timeseries based on an indicator ? Like for example a simple MA or something else ?
Or do we have to re-code the functions behind the indicators based on the simple high/low/close/open/volume timeseries ?



QuantShare
2011-02-03 05:13:29

  0

Best Answer
Currently you have to re-code the function.

We can add a Parser function that will return a time-series based on a formula.
Example:
double[] sma = Functions.ChartData.Parse("a = sma(10);").GetVector("a");

Please let me know if you need this function.



User
2011-02-03 05:32:43

  0

For the moment I wil re-code the functions
But this could be a nice improvment for a next relase to have acces to a Parser function for this like in the money management script.



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
Random Value for Each Trading Bar
Random Bar Value
Short Indicator
Simulation/Backtest Trading Indicator
Percent Rank Market Indicator

How-to Lessons
How to hide a trading indicator from a particular time frame
How to optimize an indicator in your trading system
How to dynamically update the settings of an indicator
How to display the bar index of a stock on a chart
How to change volume bar colors when the price closes down

Related Forum Threads
STOP/Profit targets based on the indicator value at the time of e...
Bullish Bearish Indicator on Bottom Bar
Previous day value for indicator in Screener?
Indicator for price
Need assistance with C# creating an indicator

Blog Posts
Detect chart patterns using the auto support/resistance indicator
How to create a trading indicator that uses stock news
How to Select the Best Market Indicator for your Trading System
Backtesting chart patterns using the auto support and resistance ...
How to create the advance/decline market breadth indicator









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.