Click here to Login





                                                   Date addition and substraction

  0

0
crfaldu
2021-08-31 20:58:12


In custom drawing tool, how can you substract two dates (objects) to get difference of number of days between two dates.
eg.
DateTime date1; DateTime date2; DateTime date3; ?
date3 = date2 - date1;

Thank you



QuantShare
2021-09-02 11:33:08

  0

in C# (since custom drawing tool uses that), here is how to do that:
int days = date2.Subtract(date1).Days;



crfaldu
2021-09-04 19:47:12

  0

Thanks, there is almost nothing Quantshare can't do :)



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
Equity and Date Export To Excel
iShares ETFs - Class, Total Net Assets, Inception Date and Number...
Year to Date Excess Return
Days To Next Date
Indicator/Price Value on a Specific Trading Date

How-to Lessons
Difference between the watchlist and the screener tools
How to download EOD quotes for active and valid stocks only
How to create trading rules based on Put and Call volume data
How to plot support and resistance lines automatically
How to create and trade a Neural Network model

Related Forum Threads
Lookup Earnings Announcement date and trade on post-earnings day
Visible Date of first and last bar on chart
Changing Colour of Graph Crosshairs and Date OHLC values
Synchronize stock charts for symbol and date
How to read date and get quote of next day.

Blog Posts
How to Scan for Parallel Resistance and Support Lines
How To Create and Backtest an S&P 500 Trend Following System
How to build and backtest a robust stock trading system
Fundamental Screen based on Stock price, ROI and Market capitaliz...
Create indicators, composites and trading systems using QL and CS...









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.