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
Investing in stocks using the Kelly criterion money management st...
Trading rules using the VIX Index
Long strategy created with the money management tool
The Best trading rules for the ADX technical indicator
Money Management System to Split Order Into Smaller Pieces

How-to Lessons
How to quickly download the most recent EOD data for your stocks
How to plot arrows below/above candlesticks on a chart
How to copy the data/settings of an account to another account
How to import trades into a portfolio
How to debug a trading system using the money management tool

Related Forum Threads
Turning the present value of an array into AN INTEGER (not array)...
Export to CSV the whole database including symbols
How to view the raw data files?
How do I change the date format?
Trading System Simulator reports into future

Blog Posts
Fundamental analysis: How to track economic indicators in the For...
QuantShare Trading Software: New Features in the 3.4.2 Version
3 Items To Get and Trade the News In QuantShare Platform
The Ultimate Guide to Create Trading Systems in QuantShare
Optimization in the statistical data analysis tool









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.