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 carnitron, Today, 08:42 PM
        0 responses
        5 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Today, 07:51 PM
        0 responses
        6 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,974 views
        3 likes
        Last Post jhudas88  
        Started by rbeckmann05, Today, 06:48 PM
        0 responses
        8 views
        0 likes
        Last Post rbeckmann05  
        Started by rhyminkevin, Today, 04:58 PM
        4 responses
        58 views
        0 likes
        Last Post dp8282
        by dp8282
         
        Working...
        X