Click here to Login





                                                   Is it possible to display bar index on the chart?

  0

0
Obuli Govindaraju
2011-10-21 22:53:46


I am doing some testing and would like to see bar index numbers appear above a candlestick in a chart.

Is it possible to do something like this?

Thanks.



QuantShare
2011-10-22 05:15:26

  0

Best Answer
Yes it is possible. Please look at the following how-to article:
http://www.quantshare.com/how-343-how-to-display-the-bar-index-of-a-stock-on-a-chart




Obuli Govindaraju
2011-10-22 11:12:44

  0

Great! Thanks for the link.

However from my understanding so far it looks like the cFunctions.High indexes the bar from right to left with 0 meaning the last bar and 1 meaning yesterday's bar and so on.

Whereas ChartData.GetTimeSeries("high") indexes the bar from left to right with 0 meaning the first bar on the chart and the last index is today's bar.

Is my observation correct? If so is there a reason why it indexes differently?

Thanks.



QuantShare
2011-10-24 04:33:23

  0

"cFunctions.High" and "ChartData.GetTimeSeries" uses the same logic. They both indexes the bar from left to right.

The only function that indexes the bar from right to left where 0 means the current bar and 1 the bar before is the "GetTimeSeries" of the money management script.
This is because this script is executed on each trading day during a simulation.



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
Trading Rules based on the Relative Strength Index - RSI Indicato...
Record High Percent - 10-day Simple Moving Average of the High-Lo...
Percentage of Stocks Outperforming the S&P 500 Index
Rank Industries based on the average Relative Strength Index
Trading rules using the VIX Index

How-to Lessons
How to display the bar index of a stock on a chart
How to screen for stocks having a high correlation with the Dow J...
How to display two stocks on the same chart
How to change volume bar colors when the price closes down
How to display the number of notes per stock

Related Forum Threads
Get the Previous N bar Date/DateTime in Money Management script
Historical intraday data for the AEX index
MMScript - Exit at the close of a bar
How do I get the date of the current bar in a custom function?
Automatic screener for checking Equities against the index trend

Blog Posts
Ranking stocks based on their correlation with the S&P 500 Index
How to Display the Year-to-Date Excess Return in a Pivot Table
Create a stock index or a trading indicator using the composite t...
Create a Pivot Table that displays the Relative Strength Index - ...
How to Calculate and Display the Bid/Ask Spread on a Chart









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.