NexusFi: Find Your Edge


Home Menu

 





rotational trading


Discussion in Platforms and Indicators

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




 
Search this Thread

rotational trading

  #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?
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
Increase in trading performance by 75%
The Elite Circle
How to apply profiles
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
17 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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts