Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

NinjaScript Strategy - automated trading

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

    NinjaScript Strategy - automated trading

    Hi all,

    I am planning to write NinjaScript Strategy to be used for forex automated trading and have the following general questions that I am hoping someone can help with:-

    (a) In order to setup and run a NinjaScript Strategy, do I need to subscribe and pay for a separate forex quote data vendor to feed the NinjaTrader? or will the NinjaTrader able to access realtime quotes directly from the broker (say, eg. forex.com)? If NinjaTrader is able to access and get realtime quotes from my broker without the need for a separate quote vendor connection, is there anyway whereby NinjaTrader can record the stream of realtime forex quotes for a particular pair and then build a historical database out of that?

    (b) I am a beginner in terms of NinjaScript, and I note from the first tutorial - level 1 entitled "Using price variables" introduced the use of important variables such as Open[0] and Close[0], etc. My major question is how do we differentiate between the different timeframe data, eg. how do we make reference to Open price for a 1-minute interval or 5-minute or 1-day as they are all different? What happens if NinjaTrader is connected to the broker and tick data are coming in, is how are these tick quote accessed via the NinjaScript in the Strategy?

    Thanks very much in advance.

    Kanda

    #2
    a) NinjaTrader is not a data vendor and you will need to supplement it with your own data source. NinjaTrader can get data from your brokerage. Please see this list of supported data providers: http://www.ninjatrader-support.com/H...HistoricalData NinjaTrader will store data and build historical database of it if you choose to do so. The option is in Tools->Options->Data. Check "Store real-time data".

    b) You will want to review this article: http://www.ninjatrader-support.com/H...ameInstruments In short, Closes[0][0] and Closes[1][0] is how you differentiate the two. For streaming data, Close[0] is always the latest information received provided CalculateOnBarClose = false.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thank you Josh. That's very helpful.

      In relation to building historical tick-data from broker's data stream, is it possible to store the bid/ask data as well?

      Thank you.
      Kanda

      Comment


        #4
        kanda, you can take a look at this thread for this - http://www.ninjatrader-support2.com/...ad.php?t=16006
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thank you Bertrand. I would like to check a point with you, is it true that in order to run a simulation using Sim101 there I must first have incoming live data (bid/ask) from either a broker or a data vendor feeding the NT? So, the simulation will be based on actual real data (coming from broker or data vendor) and not some randomly produced bid/ask?

          Thank you.
          Kanda

          Comment


            #6
            kanda, thanks for the reply - your understanding is correct. For the settings of the simulation engine, please take a look at this link - http://www.ninjatrader-support.com/H...ulatorTab.html
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ETFVoyageur, Today, 12:52 AM
            0 responses
            3 views
            0 likes
            Last Post ETFVoyageur  
            Started by Board game geek, Yesterday, 02:20 AM
            2 responses
            21 views
            0 likes
            Last Post Board game geek  
            Started by jackiegils, Yesterday, 11:05 PM
            0 responses
            5 views
            0 likes
            Last Post jackiegils  
            Started by cre8able, 05-09-2024, 09:15 PM
            2 responses
            17 views
            0 likes
            Last Post cre8able  
            Started by Trader146, Yesterday, 09:17 PM
            0 responses
            10 views
            0 likes
            Last Post Trader146  
            Working...
            X