Click here to Login





                                                   SetForwardAndBackwardBars

  0

0
Jim Harrison
2014-02-26 00:42:27


cFunctions.SetForwardAndBackwardBars(10,0);

VectorD price = cFunctions.Close;

result = price;
Global.Trace1("size of results"+ result.Length);

Why do I see the whole array length listed in output window? My expectation is that cFunctions.SetForwardAndBackwardBars would in effect trimexcess outside what I have requested before I do any calculations, i.e. limit my query to the last 10 bars.

What do I need to do if I DO NOT WANT TO analyse the entire 38000 values in result.length, I only need the last 10? This is my goal...

If cFunctions.SetForwardAndBackwardBars is not the way to accomplish this anyone got ideas? Please advise. This is a must have.

Also, would be real nice if we had a built in function/object that simply detects a new bar. cFunctions.IsNewBar ==1. Ideas here anyone?

Thanks in advance for any help......

AZ: See accompanying email from us..



QuantShare
2014-02-26 13:14:49

  0

Best Answer
- "SetForwardAndBackwardBars" is used for optimization purposes and it doesn't have a timeexcess effect.

- If you want to analyze only few values then either instructs QuantShare to get only few days worth of intraday data or perform the calculation on "result" for only the last N bars.

- We will add the "IsNewBar" feature to the todo list



Jim Harrison
2014-02-28 05:48:26

  0

Awesome! That will be a huge bonus as Quantshare transitions from EOD to real time!!


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
ETF Symbols
Italian stock market
ISE index options list
Bank Holidays
Price and Volume Trend

How-to Lessons
How to improve the performance of QuantShare databases?
How to create a hatched area in a chart
How to import trades into a portfolio
How to set order type of a trading system programmatically
How to create a Monte Carlo simulation

Related Forum Threads
Issue with QS Crashing
Name of Trading System in AMM
Error in downloading data
Money Management Based on Trailing Stops
Under-exposure due to multi-day Limit orders

Blog Posts
How to download the history of dividend payments for stocks in th...
Correlation of market indicators
New features in QuantShare - Trading Software
Historical volatility estimators
Creating a download item: Initial Jobless Claims









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 © 2025 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.