Click here to Login








Number of Times an Event Occurred in the First N-Minutes of a Trading Session

by Caleb, 2646 days ago
Share |






This function analyzes the first N-minutes of a trading session then counts the number of times a specific event occurred. As an example, you can use it to measure the number of times the price crossed above its short-term moving average during the first trading hour.

You can implement this example by typing:
a = cross(close, sma(10));
p = FirstMinutesCond(60, a);

The functions name is "FirstMinutesCond". As you can see, you must provide the number of minutes as the first argument and the condition rule as the second argument.

You can also calculate the number of times the crossover happened in the previous day then compare it with today's number. Here is how to implement this idea:
b = cross(close, sma(10));
p = FirstMinutesCond(60, b);
a = barssince(day() != ref(day(), 1)) + 1;
a = iff(p > 0, ref(p, a), 0);
rule1 = p > a;

You can plot this formula in a chart or add it as a rule in an intraday trading system.

Here is another example:
Calculate the number of occurrences of the following pattern (Close higher than open price) in the first trading hour.
p = FirstMinutesCond(60, close > open);

To calculate the support or resistance lines formed in the first N-minutes of a trading session, use the "FirstMinutesHL" function I have shared few months ago.
Support and resistance lines based on N-Minutes high/low of a trading session


Share This ->
Share |


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




Type: Trading Indicator

Object ID: 1174


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

Backtesting trading strategies using intraday data

Fundamental Stock Analysis: Rank stocks based on a valuation ratio

Different Types of Trading Indicators: Trend, Momentum, Volatility and Volume

6 ideas to implement in your portfolio to reduce your trading risk

Introduction to sentiment analysis applied to the stock market

Fundamental analysis: How to track economic indicators in the Forex market

Forecast volatility using trading rules and neural networks

Inverse Fisher Transform: Indicator, composite and trading system

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.