Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to fix it??

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

    How to fix it??

    Well, now my strategy is working as it should, but it has a problem.

    When I connect to Interactive Brokers, and start the strategy in the ninja script. If the strategy should have entered a (for ex.) long order in the overnight period and now (at the market period) the orders should be just the profit or the stoploss for that long order, IB just takes me the stoploss or the profit orders as if they where real orders.

    That make me loss money last week, because when my position should be flat at the very beggining of the session, IB ''thinks'' that I'm short or long, so it puts an stop or profit order, and when the price reach either the stop or profit, if IB thought that I was long, then it enteres a short order. The problem is that as I'm really NOT in market, in that moment I enter at the market at the other side position as my strategy should be and the worst is that it enters without Stoploss or profit targerts!!

    #2
    cozar534,

    When you start up your strategy, it recalculates what it believes its strategy position should be. This does not necessarily match what you have your account position as. It is critical that the strategy position and account position are in sync and to do this must be done through manual trades to align the account position to the strategy position.

    Alternatively, if you know you are going to start the day as flat in the account, you can go to Tools -> Options -> Strategies -> NinjaScript and set "Wait until flat".
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      thanks! I have another question. I've started it now and as I told you IB tried to put a limit and stop order without being in market I cancelled that orders.. the strategy will continue as if I just cancel THAT order? o for IB I cancelled the strategy¿?

      Comment


        #4
        cozar534,

        It depends which setting you chose. If you chose "Wait until flat", those orders are simulated orders and your strategy does not actually place a live trade till it passes a flat state. If you chose "Immediately submit" then those orders were indeed submitted to your brokerage and you will need to ensure you actually hold a position for those orders to exit with.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by kujista, Today, 06:23 AM
        0 responses
        1 view
        0 likes
        Last Post kujista
        by kujista
         
        Started by traderqz, Yesterday, 04:32 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by f.saeidi, Today, 05:56 AM
        1 response
        4 views
        0 likes
        Last Post Jltarrau  
        Started by Jltarrau, Today, 05:57 AM
        0 responses
        4 views
        0 likes
        Last Post Jltarrau  
        Started by Stanfillirenfro, Yesterday, 09:19 AM
        7 responses
        52 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X