NexusFi: Find Your Edge


Home Menu

 





rotational Trading PositionScore


Discussion in Platforms and Indicators

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




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

Hello,

I have a problem with my code.

I calculate my performance and would like to trade if it is positive. I tried to code it.
Right now my code, only buys if my performance is positive. But the problem is that now it buys according the alphabet and not ccording to the highest performance.

Could andybody help me with this?

I thank all for help.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Ripple Prime Joins Nodal Clear as Clearing Member -- $3 …
Cryptocurrency
$500M Riding on World Cup 2026: France/Spain Co-Favored …
Prediction Markets & Event Contracts
April CPI Preview: +3.7% YoY Expected at 8:30 AM ET -- C …
Traders Hideout
Post-Summit Scorecard: $36M in May 15 Bets Settle Near-Z …
Prediction Markets & Event Contracts
Expiration Day: Wall Street Rallies on Peace Hopes While …
Prediction Markets & Event Contracts
 
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)
xxx11
Stuttgart
 
Posts: 9 since Oct 2016
Thanks Given: 0
Thanks Received: 0

I think my thoughts were to complcated. It works.

But I have another question: I buy right now every month ( first trading day of month).

I would like to code that I buy the stocks every month but on the second trading day.

Does anybody knows how I could do this?

I tried the following:


newMonth = Month() != Ref(Month(), -1);
rotate = newMonth AND day() > 1;

But it does not work

Thanks eveyone helping me.


Reply With Quote
  #3 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,583 since Aug 2011
Thanks Given: 2,093
Thanks Received: 9,696


What trading platform and what language are you coding in? I'm sure the forum has a thread for both. There will be someone that can help, you need to let them find you.
Dan


Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
xxx11
Stuttgart
 
Posts: 9 since Oct 2016
Thanks Given: 0
Thanks Received: 0

thank you for your reply. I'm using Amibroker and the langugage AFL.


Reply With Quote
  #5 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,583 since Aug 2011
Thanks Given: 2,093
Thanks Received: 9,696

I would suggest using the search feature. If you cant find a platform specific thread I'd ask in the "want your ninga trader indicator created for free thread. Hope that helps. Dan


Visit my NexusFi Trade Journal Reply With Quote
  #6 (permalink)
xxx11
Stuttgart
 
Posts: 9 since Oct 2016
Thanks Given: 0
Thanks Received: 0

ok thank you, I will try the search feature.


Reply With Quote
  #7 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,583 since Aug 2011
Thanks Given: 2,093
Thanks Received: 9,696

in to the NT thread thinking maybe someone there could direct you.


Visit my NexusFi Trade Journal Reply With Quote
  #8 (permalink)
xxx11
Stuttgart
 
Posts: 9 since Oct 2016
Thanks Given: 0
Thanks Received: 0

ok tahnk you very much!


Reply With Quote
  #9 (permalink)
xxx11
Stuttgart
 
Posts: 9 since Oct 2016
Thanks Given: 0
Thanks Received: 0

Hi wldman,

thank you for your answer. What is NT thread? So far I could not find a solution.


Reply With Quote
  #10 (permalink)
xxx11
Stuttgart
 
Posts: 9 since Oct 2016
Thanks Given: 0
Thanks Received: 0


Hello,

with the following code it works that it buys every second trading day.

newMonth = Month() != Ref(Month(), -1);
rotate = Ref( newMonth, -1 );

My problem is now that I would like to be in monthly trading, which means my code rotates monthly and calculates the perfomance from the month before. But in buys on the second trading day with the open price from the second day.

Could somebody please help me?


Reply With Quote




Last Updated on November 21, 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