NexusFi: Find Your Edge


Home Menu

 





rotational trading


Discussion in Platforms and Indicators

Updated
    1. trending_up 1,622 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
xxx11
Stuttgart
 
Posts: 9 since Oct 2016
Thanks Given: 0
Thanks Received: 0

Hi,
I wrote an algorithm which says that I would like the 5 best stocks each month and sell them in the same month. I choose the 5 best stocks according to the performance.
What I would like to do now:
I would like to have in total 50000 equity capital. But for each stock 10000.
That means that I would like to buy every month 5 stocks with an equity capital of 10000 per stock. Next month when I buy it I would like to have the same.
Right now, the capital is accumulating. But I do not want that my algorithm accumulates.
The other thing is that I would like to say: If for example AAPL is in january under the 5 best ones and in february as well. I don't want to buy it again and the equity capital in total is 40000.
Is there anyone who could help me with this?



SetPositionSize(50000,spsValue);
PosQty = Param( "Number of Positions", 5, 1, 20, 1); // name, MaxOpenPositions, MinShares,
SetOption( "InitialEquity", 50000 );
SetPositionSize(20,spsPercentOfEquity);
SetPositionSize(PosQty,spsNoChange);
SetOption( "MaxOpenLong", PosQty );
SetOption( "MaxOpenPositions", PosQty );
SetOption( "WorstRankHeld", PosQty );
SetOption( "AllowPositionShrinking", True );
Edit/Delete Message


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Hungary Called for Magyar at 97pct, Ending 16-Year Orban …
Prediction Markets & Event Contracts
Powell in 48 Hours: Word Markets Give 78% on Inflation, …
Prediction Markets & Event Contracts
Prediction Markets Expiry Day: Trump Eyes War Exit, $230 …
Prediction Markets & Event Contracts
Weekend Update: First Qatari LNG Transit Attempted -- IR …
Traders Hideout
Bookmap Global Plus Lifetime + Lifetime Addons For Sale
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
 prouser 
Zurich/Switzerland
 
Posts: 79 since Oct 2014

 
Code
ieq = 50000;

SetOption( "InitialEquity", ieq );

SetPositionSize( ieq / 5, spsValue );


Reply With Quote




Last Updated on October 26, 2016


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts