Click here to Login








Percentage of Bars a Trading rule Generates Buy/Sell Signals

by QuantShare, 5181 days ago
Share |


A trading rule has only two states, black or while, true or false. In a given period, the state of a trading rule could remain constant (true or false) or it could change one or several times from one state to another. During this period, it could be interesting to calculate the percentage of time (bars) where the trading rule was true; consequently we will also discover the percentage of trading bars where the trading rule was false.

This trading indicator allows you to perform such calculation for a given number of bars. The indicator function has two parameters. The first one takes the time series or trading rule that you want to analyze and the second parameter takes the number of trading bars that the indicator should analyze to compute the percentage of bars the trading rule was true or higher than zero.

For example, the following formula: PerValue(rsi(14) > 70, 30) calculates for each trading bar, the percentage of times the Relative Strength Index was higher than 70 during the last 30 bars. A value of 100 indicates that the RSI was always higher than 70 during the last 30 bars.

Here is another example:
PerValue(close > sma(10), 20)

This trading indicator returns the percentage of bars, during the previous 20 bars, where the provided trading rule returns a buy signal (may also be interpreted as a sell signal); that is the close price of an asset is higher than its 10-Bar simple moving average.

This PerValue indicator is similar to another one - % bars in last N trading days where stock close price increased. The latter calculates the percentage of bars where the provided time series increased compared to its previous bar value.




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




Type: Trading Indicator

Object ID: 694


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

Trading Indicators using the Rank and Percentile functions

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

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