Click here to Login








Time-series Sum for the first Minutes/Hours of a Trading Day

by Caleb, 3270 days ago
Share |






This trading indicator has the same parameters as the Price at a specific Intraday Time item I have shared yesterday. However, instead of getting a time-series value at a specific bar, this indicator calculates, for the specified price series/indicator, the sum of all bars that occurred before a given time.

For example, the following formula (YTimeSum(volume, 10, 30)) gets the total volume that occurred before 10:30. The result is available in bars starting from 10:30, while previous bars get a NAN or Not a Number value.

Even if this function returns the sum of the provided array, you can get the average value by dividing this sum by the number of trading bars that are available before the specified intraday time. If you are using a 15 minutes time-frame then to get the average volume before 10:30, simply divide the above formula by 4 (There are 4 trading bars between 9:30 and 10:30).

Here is a very good example that illustrates the power of this indicator. The formula below calculates the ratio of the today's first hour volume to yesterday's first hour volume. The higher the value is the higher today's volume (first trading hour) is compared to yesterday's volume.

todVolume = YTimeSum(volume, 10, 30);
yesVolume = iff(RemoveSameSignals(iff(NaNtoZero(todVolume, 1) == 0, 0, 1)) == 1, NaNtoZero(todVolume, 1), 0);
yesVolume = ValueWhen(yesVolume != 0, yesVolume, 2);
ratio = todVolume / yesVolume;

Yesterday's volume is calculated by transforming NaN values to zero. After that excessive signals are removed so that we can use the "ValueWhen" function to get the previous volume sum value. You can update the last parameter (2) in the "ValueWhen" function to get volume for previous days.


Share This ->
Share |


You have to log in to bookmark this object
What is this?
Additional Information




Type: Trading Indicator

Object ID: 831


Country:
All

Market: All

Style:
Technical Analysis

Reviews
You must log in first

Join now
and get instant access for free to the trading software, the Sharing server and the Social network website.
Click here


Related objects

Empty

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object

Technical Analysis


Fundamental Analysis



Random Blog Posts

QuantShare Version 2.1.0 - Trading Software

How to create a ratio indicator using QS Trading Software

Screening with the composite indicators

Synchronize Buy/Sell List of Rules in the Trading System Optimizer

QS Trading Software: Global Script

New Ranking and Percentile Composite Functions

QS Trading Software: Database Optimization

Stock Market Prediction with QuantShare

Show All

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object






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