Click here to Login





                                                   SkipPeriods

  0

0
saratur
2011-01-19 05:38:56



I would like to have a strategy that can hold several positions of different stocks at the same time. If there is an entry, I would like to hold the position for a minimum of n days.

- is the correct way to implement this is by using SkipPeriods(n) in Money Management?
It is not clear to me whether this method affects only the symbol that just entered the position, or it will affect all symbols, and all trading will stop for n days.

- if I would like to implement this in the strategy itself, is there a simple command for this?



QuantShare
2011-01-19 12:26:13

  0

Best Answer
Using Money Management:
In "OnClosePosition", type:

if(Functions.GetPositionDetails().BarsSinceEntry < 10)
{
Functions.DontCloseTheCurrentPosition();
}


Using Strategy Rules:

Example:
buy = rsi(14) > 70;
buy = RemoveSameSignals(buy);
sell = rsi(14) < 40 and barssince(buy) >= 10;



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
ISM Non-Manufacturing Index
National Commodity & Derivatives Exchange, NCDEX, Commodity S...
Historical Data of CAPS Ratings
Ratio of Total Market Capitalization to US GDP
Top 20 stocks with the highest 10 day rate of change - Current an...

How-to Lessons
How to automatically draw Fibonacci Retracement for each new stoc...
How to create a log scale chart
How to add future bars to plan for market scenarios
How to scale and move the chart Y-axis
How to remove a chart pane's margins

Related Forum Threads
how to download nifty50 chart?
BUG IN CDL SCREENING
QS standalone run option - no network connectivity.
Importing large csv
Deleting no-data symbols

Blog Posts
Example of advanced rule
Trading software new features
Short Index - Part 1
Survivorship bias
Trading Orders - Part 1









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