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
Canada Stock Market Symbols
Advancing-Declining-Unchanged volume for NYSE, AMEX and NASDAQ
Technical indicators time series
Filter high and low spikes
ASX Historical data

How-to Lessons
How to display two stocks on the same chart
How to associate an index with a list of stocks
How to plot support and resistance lines automatically
How to display the bar index of a stock on a chart
How to rename a ticker symbol

Related Forum Threads
Same High Low in charts
Daily Beta Intraday
Open position profit/loss method in money manager
Permabear Sentiment Index
Add a strategy to Simulator

Blog Posts
Watch your support and resistance lines
Money Management: Optimize a trading system
Trend Following and Moving Averages
Transaction Costs
The average maximum drawdown metric









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.