Click here to Login








Number of Trading Bars to Fill a Gap Up

by Tom Huggens, 2352 days ago
Share |


A Gap occurs when the price of a stock or any other security moves up or down with few trading in between. Gap Up is defined as a stock price with a today's low that is higher than yesterday's high and the opposite for the Gap Down; stock price with a today's high that is lower than yesterday's low.
There are many reasons that could lead to gaps in a financial asset. Both technical and fundamental factors could make the stock or the financial asset jump leaving gaps behind it. For example, earnings almost always force a stock to gap up or gap down if the company's earnings are much higher or much lower than what traders, investors and analysts expected.

After a gap, the stock price may continue its rally or decline or it may move back to the pre-gap price level. When this happens, we say that the gap has been filled. Most of the time gaps are filled.

This trading indicator signals bars where a gap up has been filled. It also returns the number of days since the last gap up, that is, the number of days that took the stock or security to fill its gap up.
Here is an example of a trading rule that returns a signal if a gap filling occur and if it took the security between 10 and 30 trading bars to fill the gap up:
GapUpFilled() >= 10 and GapUpFilled() <=30

Last Gap Up/Gap Down Price Size is another trading indicator I have shared. It returns the gap up or gap down size, that is, the difference between the high and the low of the gap.

You can use both functions to retrieve the gap size on the bar where the gap has been filled:
iff(GapUpFilled() > 0, ref(GapSize(0), GapUpFilled()), 0)

In order for the above line to work properly, you must make a small change to the GapSize function so it doesn't return a value when a gap down occurs.




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




Type: Trading Indicator

Object ID: 678


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

How to Create Custom Metrics for Your Trading Positions

How to search for a trading item

How to create market indicators using the composite function - Part 3

How to create market indicators using the composite function - Part 2

Create a Pivot Table that displays the Relative Strength Index - RSI

6 Stock Trading Items Related to the New York Stock Exchange - NYSE

Pivot Tables in QuantShare Trading Software

How to create market indicators using the composite function - Part 1

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