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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        110 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        156 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        74 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X