Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy won't run although backtest works fine

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

    #16
    Hmm, that's true. Failed to see that when I thought of a strategy sitting yellow for seven hours. Thanks for the clarification.

    Comment


      #17
      Hi,

      I am using a paid datafeed with Barchart, and will be using my Interactive Brokers account for live trading.

      1) I am now a little confused about the P&L figures and account positions that I see in the tabs. Are these figures the hypothetical model/strategy P&L, or the real P&L as reported by the broker?

      2) The way I see it, to minimize the discrepancy between model/Strategy P&L and real P&L is to send limit orders with small or no slippage. Otherwise, if I send market orders based on prices provided by Barchart, the fills provided by Interactive Brokers could be WAAY off! And of course, I should do no manual trades.

      3) If however, the model sends limit orders based on a signal generated off prices provided by Barchart, and I don't get a fill at that price, will there be a discrepancy between model and actual positions?

      Comment


        #18
        Skyholder, due to the decentralized nature of the FX spot market we would not suggest mixing data from different providers, if you do, yes, the limit order approach would likely be best but you could miss trades then.

        The PnL report in the account position tab from your IB live account is real - the strategy tab would report it based on the strategy position Pnl.
        BertrandNinjaTrader Customer Service

        Comment


          #19
          How then do I instruct my strategy to send limit orders as opposed to market orders? Is there an option which I can select?

          Also, using some code from the timefilter sample, I have set up a time filter to trade only during EST 0400 - 1700 hrs using the line of code below:

          if ((ToTime(Time[0]) >= 040000 && ToTime(Time[0]) < 170000))

          Does Time[0] make reference to Eastern Standard Time? If not, how can I specify that I wish to trade only during these hours?

          Thanks!

          Comment


            #20
            Skyholder, this would need to be done in your strategy code then directly, you would need to use another Enter() method to send limit orders then on your trigger (EnterLongLimit(), EnterShortLimit() ).

            NinjaTrader would use the timezone your PC is setup in, as such Time[x] would use it, too accessing the historical bar time stamp values.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by rene69851, 05-02-2024, 03:25 PM
            2 responses
            29 views
            0 likes
            Last Post NinjaTrader_Kimberly  
            Started by NUVERSA, Today, 09:31 AM
            0 responses
            6 views
            0 likes
            Last Post NUVERSA
            by NUVERSA
             
            Started by ttrader23, Yesterday, 09:04 AM
            8 responses
            37 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by tonynt, Yesterday, 01:48 PM
            2 responses
            12 views
            0 likes
            Last Post tonynt
            by tonynt
             
            Started by goodknight777, Today, 08:43 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X