Click here to Login





                                                   How to implement Sell Condition "N-Bar Stop AND Rank>50"?

  0

0
Kiran
2019-03-12 11:45:53


I want to write a Sell Condition as Sell = "5-Bar Stop" AND Rank1>50 [Basically evaluate the rank after 5 days of holding the position and then sell]
How do i write "5-Bar Stop" in code? [Didn't find it in documentation or knowledge base]



QuantShare
2019-03-13 03:44:27

  0

For the 5-bar stop, you can either use the money management tool (advanced) or simply use the N-Bar stop in the simulator.

You can implement this in the QS language but you need to be aware that QS formulas are used to generate signals and thus at the execution time, QuantShare does not when a stock was bought or sold.

You could try something like:
sell = barssince(buy) >= 5;



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
LSS Pivotal Buy and Sell Numbers - Trend Reaction
How far are the close prices from the support line
Number of Consecutive Trading Bars Condition was True
Return Since a Specific Condition Occurred
buy sell

How-to Lessons
How to generate buy/sell signals from a trading system
How to filter stocks in a market composite
How to perform a basic quantitative analysis using the S&P 500
How to download new quotes when selecting a chart
How to plot the relative performance of several stocks/indices

Related Forum Threads
how to add buy condition when the color change
Multiple Sell Order Types in a single system
Using Drawdown in sell rules
Trailing Stop With Condition
Continues Buy / Sell

Blog Posts
How to create buy and sell trading rules based on News Data
How to get buy and sell orders for a portfolio based on a trading...
How To Create and Backtest an S&P 500 Trend Following System
How to use QuantShare screener to trade penny stocks
How to create a trading system, screen and composite using earnin...









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