Click here to Login





                                                   Graphing hypothetical candlesticks into the future?

  0

0
Josh McCormick
2020-07-05 18:25:34


I understand that I can adjust the chart to leave some unpopulated space on the right hand side of the chart. If a custom technical indicator has predictions for bars that don't yet exist, is it possible for the indicator to paint those bars on-screen? Assuming a C# based indicator, how?

Thanks,
Josh McCormick



QuantShare
2020-07-06 12:30:55

  0

Here is how:

plot(sma(5), "");
UpdateSettings("MoveToFuture", 4);



Josh McCormick
2020-07-07 17:00:41

  0

Somewhat related, I'm guessing there is an UpdateSettings call to set Linear or Logarithmic scale on a chart?
How might I do that?



Josh McCormick
2020-07-08 19:34:11

  0

Let me ask the question another way...

When working with formulas, I find out that ref (close,5) is equal to 55.
I want to change the 5th item in close to be a different value. I want it to be 80.
What is the proper syntax for the command that sets close[5] equal to 80?

After that, how do I identify the number that corresponds to one bar AFTER the last bar in my chart?
I think I might actually have the answer to that one. Would it be represented by TotalBars()?

And finally, say that the array of pricing data is 5662 bars long [offset 0 through offset 5661]. If I were to successfully add price data into offset 5662 (extending the number of bars by one)... what happens when time passes and the next bar of data is received (in live mode)? Will it overwrite the price data that I put into offset 5662, or will it populate offset 5663 with the next bar's worth of information?

Thanks,
Josh McCormick



QuantShare
2020-07-09 10:53:00

  0

Best Answer
What is the proper syntax for the command that sets close[5] equal to 80?

This cannot be done in QS language. You need to create a custom function in C# for this using "Tools -> Create Functions".

To get the next bar, use ref(close, -1) or close[-1]

You also cannot add bars programmatically.



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 using the VIX Index
Transform any order into a limit order selectively based on a tra...
Investing in stocks using the Kelly criterion money management st...
Thicken Candlesticks
Money Management System to Split Order Into Smaller Pieces

How-to Lessons
How to copy the data/settings of an account to another account
How to quickly download the most recent EOD data for your stocks
How to download Portfolio123 data into QuantShare
How to plot arrows below/above candlesticks on a chart
How to import trades into a portfolio

Related Forum Threads
Turning the present value of an array into AN INTEGER (not array)...
Export to CSV the whole database including symbols
Thickening Candlesticks
Trading System Simulator reports into future
Graphing Morningstar Fundamentals

Blog Posts
Fundamental analysis: How to track economic indicators in the For...
Create a stock index or a trading indicator using the composite t...
How to Import Metastock data into QuantShare
The Ultimate Guide to Create Trading Systems in QuantShare
How to Automatically Import Local Data Into QuantShare









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 2020 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.