Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pair trading / Spread trading

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

    Pair trading / Spread trading

    Hi,

    1) I'm wondering if you are able to in Ninja Script to Pair Trading / Spread Trading, where you have (2) data feeds of 2 different stocks and are able to say long one and short the other at the same time?


    2) NTMarketPosition("") ---> okay say I have a trade station chart on. The symbol is INTC. In order to find out the marketposition of INTC I type NTMarketPosition(""), but say that while I'm on the INTC chart I want to find out the market position of CSCO, can I type NTMarketPosition("CSCO");

    Thanks

    #2
    1) Yes, please see SampleMultiInstrument strategy and docs related: http://www.ninjatrader-support.com/H...struments.html
    2) No. But you could code your own TS EL function to do that, please check out how NTMarketPosition function is implemented in TS EL and how the symbol is referenced. Note: This is beyond what we can support, you would need to try on your own.

    Comment


      #3
      1) NT 6.5 due out shortly is better equipped to handle this since we will introduce an OnMarketData() method that is fired for every change in market data for the "pair" you are tracking.
      RayNinjaTrader Customer Service

      Comment


        #4
        excellent,

        also are you able to in ninja script run multiple strategies?

        Thanks

        Comment


          #5
          - you can run multiple NS strategies on different instruments concurrently
          - you can not run a NS strategy within a NS strategy

          Comment


            #6
            I am trying to convert a pair trading/spread strategy that I built in WealthLab. I am having a bit of a hard time, starting with the basic of how do I get the price of the second stock, then proceed to use the bar close price of both to go through my calculations. Can you please direct me. As I understand NT7, which is what im using, has some special features for this...can you please explain all.
            Thx in advance!

            Comment


              #7
              Hi nightriderx,

              I have implemented something very similar here - http://www.ninjatrader.com/support/f...d=1&linkid=293

              Using a multi-series script - http://www.ninjatrader-support.com/H...ameInstruments
              TimNinjaTrader Customer Service

              Comment


                #8
                The first link does not seem to be working

                Comment


                  #9
                  artov,

                  Thanks. It has likely been moved to a different location.

                  Believe it is this one: http://www.ninjatrader.com/support/f...d=4&linkid=363
                  Josh P.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by andrewtrades, Today, 04:57 PM
                  1 response
                  8 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by chbruno, Today, 04:10 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post chbruno
                  by chbruno
                   
                  Started by josh18955, 03-25-2023, 11:16 AM
                  6 responses
                  436 views
                  0 likes
                  Last Post Delerium  
                  Started by FAQtrader, Today, 03:35 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post FAQtrader  
                  Started by rocketman7, Today, 09:41 AM
                  5 responses
                  19 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Working...
                  X