Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Signal from one instrument order on another

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

    Signal from one instrument order on another

    Is it possible to recieve a signal from one instrument and make a trade on another?

    I have looked at the multiinstrument example, but can't work out how it checks one instrument.

    EG: a simple SMA cross on the ES sends a buy/sell signal to the YM at that moment?

    TIA
    Last edited by Captain Haddock; 10-17-2007, 05:54 PM.

    #2
    Yes, absolutely. You would run a strategy on the YM chart and then in initialize you would add:

    Code:
    Add("ES 12-07", PeriodType.Minute, 1);
    Then in OnBarUpdate() you could do something like -

    Code:
    if (BarsInProgress == 0)
    {
        if (CrossAbove(SMA(BarsArray[1], 5), SMA(BarsArray[1], 20), 1))
            EnterLong();
    }
    RayNinjaTrader Customer Service

    Comment


      #3
      Thanks RAY

      Comment


        #4
        Hi Ray, Is it possible to use the median for the SMA calculation?

        Appreciate your help.

        Comment


          #5
          Yes.

          Code:
          if (BarsInProgress == 0)
          {
              if (CrossAbove(SMA(Medians[1], 5), SMA(Medians[1], 20), 1))
                  EnterLong();
          }
          RayNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by ScottWalsh, Today, 06:52 PM
          0 responses
          1 view
          0 likes
          Last Post ScottWalsh  
          Started by ftsc2022, 10-25-2022, 12:03 PM
          5 responses
          255 views
          0 likes
          Last Post KeyonMatthews  
          Started by ScottW, Today, 06:09 PM
          1 response
          4 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by Board game geek, 10-29-2023, 12:00 PM
          14 responses
          244 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by Waxavi, 04-19-2024, 02:10 AM
          4 responses
          56 views
          0 likes
          Last Post sonia0101  
          Working...
          X