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
b) automatically adjust stop loss to the low/high of the previous x periods
c) override standard stop treatment on entry bar
In detail:
a) if you want to enter a long position at 100 with a stop at 95 and due to an opening gap you will effectively enter at 99, then your stop will be at 94 if you use SetSimStop(_StopLoss, _Point, 5, 1);
To avoid that set the parameter "Use exact numbers" to "Yes" and use the statement SetSimStop(_StopLoss, _Point, 95, 1) in your trading system.
b) this is kind of a trailing stop. Set "Stop Adjustment Enabled" to "Yes" and "NbPeriods" to 2 for instance and on each bar ater the entry bar the stop loss will be adjusted to the low of the 2 previous bars. In addition you can set a "Distance" either in percent or points, which will be added to the stop.
E.g. if the 2 bar low is at 95 and you have a distance of 1% then your long stop will be at 95 - 95*0.01 = 94.05
c) per standard the profit stop is triggered on the entry bar if the high is above or equal the entry price (long) as without having intrabar data, it cannot be determined in all cases whether the high happened before or after the entry.
This script provides the following solution: Profit target on the entry-bar is only executed, when
a) the entry happened at Open or
b) target price is reached at close.
In these cases profit stop is independent from intra-bar development.
Analyse Close Reasons: select "Yes" if you want to analyse exit reasons in the trading system report.
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.