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

Setting spread

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

    Setting spread

    When runnning backtest, functions getcurrentask and getcurrentbid return same value, is it somehow possible to set spread? I have imported bid data and I have to force NT to trade for ask which is 2 pips above bid. How do I do it?

    #2
    Right. GetCurrentBid/Ask are the same values in backtesting.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      I know, but

      but how do I handle it? You just wrote what I have found too, that is not an answer. I need some resolution how to work with it - to simulate real world - to answer my previous question. Please. Can I set somewhere that data are bid so NT will intelligently use them as bid and simulate ask according to spread which I set somewhere? I am just a beginner in NT, but this seems to me like a critical problem protecting me from realmarket backtesting.

      Comment


        #4
        There is no supported way in NT to store and access historical bid/ask data.
        RayNinjaTrader Customer Service

        Comment


          #5
          A simple, possibly effective guesstimate, would be to multiply the number of trades taken during the backtest by your broker's usual spread for that pair.

          Or set the commission value appropriately for your pair to adjust for spread.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Waxavi, Today, 02:10 AM
          1 response
          16 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by Kaledus, Today, 01:29 PM
          5 responses
          13 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by Waxavi, Today, 02:00 AM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by alifarahani, Today, 09:40 AM
          5 responses
          23 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by gentlebenthebear, Today, 01:30 AM
          3 responses
          17 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X