Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Buy strongest Sell weakest

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Buy strongest Sell weakest

    Hi,

    Correlation strategy:

    three tickets (nasdaq, dow, sp500)

    i have a code to identify which one of these is the strongest when only two tickers are involved. i think i can calculate how to identify the strongest mover if three tickers are involved.

    but how can i enterlong(max(strongest ticker));

    ?

    #2
    Hello calhawk01,

    Thank you for your post.

    So EnterLong() on the price level of the highest strongest ticket? Are you entering on a different instrument then the calculations are performed on?

    Comment


      #3
      Originally posted by NinjaTrader_PatrickH View Post
      Hello calhawk01,

      Thank you for your post.

      So EnterLong() on the price level of the highest strongest ticket? Are you entering on a different instrument then the calculations are performed on?
      so if

      instrument=1nasdaq rank=1
      instrument=2spy rank=2
      instrument=3dow rank=3

      EnterLong(instrument1)



      if

      instrument=1nasdaq rank=2
      instrument=2spy rank=1
      instrument=3dow rank=3

      EnterLong(instrument2)

      and the ranking are consistently changing; for example ranking can be based on daily performance. so if at a point in time dow is outperforming spy and nasdaq, go long dow. close the position when spy ends up performing better that down and go long spy etc

      Comment


        #4
        Hello calhawk01,

        Thank you for your response.

        This is possible by referencing the barsInProgressIndex in the EnterLong() method. The syntax is as follows: EnterLong(int barsInProgressIndex, int quantity, string signalName)

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        85 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        47 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        29 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        32 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        67 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X