This is a trading item or a component that was created using QuantShare by one of our members.
This item can be downloaded and used by QuantShare Trading Software.
Trading items are of different types. There are data downloaders, trading indicators, trading systems, watchlists, composites/indices...
You can use this item and hundreds of others for free by downloading QuantShare.
Top Reasons Why You Should Use QuantShare:
Works with US and international markets (stock, forex, options, futures, ETF...)
Offers you the tools that will help you become a profitable trader
Allows you to implement any trading ideas
Exchange items and ideas with other QuantShare users
Our support team is very responsive and will answer any of your questions
We will implement any features you suggest
Very low price and much more features than the majority of other trading software
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)
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.