Click here to Login





                                                   Managing buys/sells/holds

  0

0
Alpha Trader
2018-01-13 13:48:10


Hello -

I have a script where I rank symbols.

comborank = comp(ROCP(50),"rank");

test = Comp(ROCP(50),"count");
pos = iff(test >= 15,15,test);

SetSimPosSize(100/pos,_PercentOfEquity);
SetSimTiming(_Buy,_Close,0);
SetSimTiming(_Sell,_Close,0);

buy = (comborank <= POS) and (RebalIndexDate ==0);
sell = (RebalIndexDate ==0);


I would like the system to be 100 percent invested - no more - Also I would like it to hold positions which have buy signals.

When I use -

sell = (RebalIndexDate ==0) and (comborank > POS);//

The system doesn't hold 15 Positions......

Any Sugestions?



QuantShare
2018-01-15 04:51:32

  0

In your trading system, make sure the "Number of positions" is set to 15 or more depending on the number of max symbols you want to have.


Alpha Trader
2018-01-17 16:08:52

  0

Yeah, I did that - Wasn't the issue. though. When use Sell = 1; it gets the job done, but it doesn't allow me to calculate turnover.

Thanks-



QuantShare
2018-01-18 08:52:51

  0

Try with
sell = comborank > POS;



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
iShares Exchange-Traded Funds - ETF Fees and Expenses
Historical Stock Quotes Data for more than 50 Exchanges
S&P 500
Trading Rules to use with the Trading System Optimizer
Entry for long (Multibagar)

How-to Lessons
How to create a correlation matrix of several securities
How to add trades from one portfolio to another one
How to add a trading indicator to a chart
How to use a custom drawing tool
How to plot support and resistance lines automatically

Related Forum Threads
Quotes Database Management
Folders
Advanced Money Management
delay in moving average
Change user?

Blog Posts
Creating and managing notes for your stocks
Example of advanced rule
QuantShare Trading Software: New Features in the 3.3.2 Version
Different Ticker Symbols for Each Data Source
How to use QuantShare screener to trade penny stocks









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