Click here to Login








Swing Point Function (SP)

by SystemTrade, 4665 days ago
Share |






If - while swing-trading - you want to buy e.g. when a higher swing high occurs after a higher swing low then you could set up your trading system as follows:
buy = sp(10, -1) > 0 && sp(10, 0) > sp(10, 2) && sp(10,1) > sp(10,3);

What does it mean?

The SP function returns the price level of any swingpoint occurred on or before the current bar.
There are two parameters to this function.
1. "bars" is the number of bars required to identify swing highs and lows.
2. "point" indicates the sequence number of a swingpoint. 0 is the most recent swingpoint. 1 is the preceeding one and so on. Note that you can set this parameter to -1. The function then will return the price level of the most recent swingpoint 0 with a positive sign if swingpoint 0 was a local high and it will return the level of swingpoint 0 with a negative sign if it was a local low. So you are able to define with only one function at every bar whether the last swingpoint was a high or a low and what the level of any preceeding swingpoint was.

Coming back to the example ...

sp(10, -1) > 0 checks if the most recent swingpoint (defined over 10 periods) was a high swing. sp(10, -1) < 0 would check on a low swing

sp(10, 0) > sp(10, 2) checks if the last high swing (swingpoint 0 as checked with the previous statement was higher than the high swing before (number 2, because there was a swing low number 1 in between). If you would have had sp(10, -1) < 0 in the previous statement to check on a low swing, then sp(10, 0) > sp(10, 2) here would mean a check if the last low swing was higher than the low swing before.

sp(10,1)) > sp(10, 3) checks if the last low swing (number 1) was higher than the low swing before (number 3).

This function is an enhancement to the Swing Trading Indicator (STI) recently shared. You do not need to download that one in addition, but if you are interested in more details, refer to Swing Trading Indicator (STI)


Share This ->
Share |


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




Type: Trading Indicator

Object ID: 1121


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

Download quotes, news, sentiment, fundamental... data using QuantShare

How to create the advance/decline market breadth indicator

Display several stock market charts with one click

Fundamental Screen based on Stock price, ROI and Market capitalization

6 techniques to improve the performance of your stock trading strategy

Trading System: Buy stocks with the highest Sharpe ratio

Create indicators, composites and trading systems using QL and CSharp

Custom Indicator: Accumulation Distribution Line

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.