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
History of dividend payment for stocks in the US stock market
Switch Traded Asset
Year to Date Excess Return
BSE historical data

How-to Lessons
How to improve the performance of QuantShare databases?
How to create a screen
How to download EOD quotes for active and valid stocks only
How to create a hatched area in a chart
How to add future bars to plan for market scenarios

Related Forum Threads
Quotes Database Management
Folders
Advanced Money Management
Portfolio features
how 2 wrt rule

Blog Posts
Creating and managing notes for your stocks
How to download the history of dividend payments for stocks in th...
How to Optimize a Trading System with Thousands of Billions of Co...
How to Backtest Each Stock or Asset Individually
5 position sizing techniques you can use in your trading system









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.