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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        68 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        38 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X