Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with Forex Backtesting

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

    Help with Forex Backtesting

    I'm doing backtesting with intraday Forex data from Gain.

    1. I'm getting trades at 6am that I don't want. Where can I define it to only test/trade during the NY session?

    2. In the Trade tab list, prices are only showing to 2 decimals instead of 4. Where do I fix this?

    3. Going into the Chart of the backtest and using the Data Box (Ctrl-D), for the bars, the prices are correct to 4 decimals, but the open, high, low and close always have 00 in the 3rd and 4th places. This isn't right.

    4. I'm sure related to #3 and #4 the individual trade profits are showing as 1 or 2 cents and should be $100 or $200.

    Thx.

    #2
    Hi Brooks,

    1. Please setup a time filter for your conditions inside the strategy - http://www.ninjatrader.com/support/f...ead.php?t=3226

    2. What FX spot symbol are you working with and what is your pip setting under Tools > Options > Misc?

    3. Please see 2

    4. What backtesting qty did you enter?



    Special Circumstances with GAIN Forex
    During a backtest, order quantity is an absolute value which is in most cases different than in a real-time brokerage account. As an example, 1 traded FX lot at a live brokerage account might be the equivalent to 100,000 of notional value (check with your broker) however, in backtest a value of 1 is a literal value of 1 and not 100,000. Thus, if you want to trade 100,000 in a backtest you need to put in a value of 100,000. Just remember that if you convert your strategy from backtest to live you will need to amend the order quantities appropriately.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      1. Ok, added time filter. Took care of that issue.

      2. $USDJPY. I have no pip setting under Tools Options Misc (see attached).

      3. Problem still exists.

      4. I changed the "Set order quantity" to "by default quantity", then changed "Default quantity" from 1 to 100,000.

      The trade amounts are better, but still not right because all entries and exits only have 2 decimals of accuracy instead of 4 as is required for forex. So it assumes all trades are multiples of 100 pips (100, 200, 300, etc.).

      Please advise.
      Attached Files

      Comment


        #4
        There is definitely something wrong with the Gain quotes for $USDJPY. All quotes are in the format 87.1500. Other Gain forex symbols seem to be 87.1512.

        Is there a way NT can check with Gain about this?

        Comment


          #5
          If you're using NT7, the Pip setting is under Tools > Options > Data then, please ensure this is set to Pip for working with Gain.

          For the decimal issue, I could not reproduce here, please reset instruments under Tools > Options > Data as well and then restart NT fresh and recheck with freshly downloaded data.

          Thanks
          BertrandNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by futtrader, 04-21-2024, 01:50 AM
          5 responses
          56 views
          0 likes
          Last Post NinjaTrader_Eduardo  
          Started by PeakTry, Today, 10:49 AM
          0 responses
          2 views
          0 likes
          Last Post PeakTry
          by PeakTry
           
          Started by llanqui, Today, 10:32 AM
          0 responses
          5 views
          0 likes
          Last Post llanqui
          by llanqui
           
          Started by StockTrader88, 03-06-2021, 08:58 AM
          45 responses
          3,992 views
          3 likes
          Last Post johntraderuser2  
          Started by TAJTrades, Today, 09:46 AM
          0 responses
          8 views
          0 likes
          Last Post TAJTrades  
          Working...
          X