• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy enabled but not calculating

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

    Strategy enabled but not calculating

    Hi,
    I am currently running 4 strategies simultaneously and since automation is new to me I am closely observing what might be faulty in them.
    Today I experienced something I did not before and would like to know what the cause might be:
    The strategies were set-up to trade and should have entered trades/drawn objects etc. but non of this happened despite them being enabled, synced.
    I am using IB-TWS which is restarted daily.
    What can cause behavior like this? No reloading after updating a strategy code, TWS restart, Datafeed disconnection?

    Thanks in advance;
    B.

    #2
    Hello Balage0922,

    Thanks for your post.

    If your strategy is enabled and green that would mean it is allowed to trade with realtime data. If the strategy is not taking actions you expect debugging prints should be added so you can verify:

    1. Your order methods are being reached.
    2. The logic controlling these order objects is becoming true and allowing these order methods to be reached.

    I would suggest first enabling Trace orders to see the last times the order submission methods were reached. You can also add a print next to your order methods to see that they are getting reached.

    If they are not getting reached, the logic will tell the tale. The next step would be to add prints to show the values used to evaluate your conditions. This print should be placed outside of your condition. This would tell you why the logic is not allowing the order submission method to be reached, and resolving the issue should be clear.

    More information on TraceOrders and Debugging tips is linked below.

    TraceOrders - https://ninjatrader.com/support/help...aceorders2.htm

    Debugging Tips - https://ninjatrader.com/support/help...script_cod.htm

    If you are seeing that your order submission logic is being reached, but is not firing, you may be hitting an internal rule of the Managed Approach.

    Managed Approach Internal Rules - https://ninjatrader.com/support/help...antedPositions

    If you see that your order submission logic is being reached, not firing, but you are not hitting an internal rule, could you post the output window seen? If you can provide a simplified version of the strategy logic that exhibits this issue, we could also give further input. We should note, the logic must be reduced to clear terms for us to give any feedback.

    We look forward to being of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks Jim,
      I never came across the managed approach section, will go trough this.
      Just another info I forgot to add, that all strategies were non respondent, which is strange and made me believe that there is some other problem than strategy logic / code bug etc. Especially that after reloading the strategies, they started to calculate. I inserted a code now where I receive an alert/print/email at first bar of session to make sure the strategy itself is online.
      B.

      Comment


        #4
        Hello Balage0922,

        Adding debugging prints will allow us to see if the logic is running, or if the logic is preventing something from occurring.

        If you do not see prints in OnBarUpdate that are not within a condition, we would know that the strategy disabled from an error, or there is not any data coming through the strategy. If there is no data coming through the strategy, I suggest opening a chart of that instrument with Chart Trader open to verify you are getting both historical data and realtime data. (Bid/Ask will change in realtime with Chart Trader open.)

        We look forward to being of further assistance.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Antares66, Yesterday, 05:19 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_ChrisSch  
        Started by lavalampmj, Yesterday, 05:25 PM
        0 responses
        7 views
        0 likes
        Last Post lavalampmj  
        Started by jmneto, Yesterday, 05:18 PM
        0 responses
        9 views
        0 likes
        Last Post jmneto
        by jmneto
         
        Started by Bobbyj78, Yesterday, 02:21 PM
        2 responses
        17 views
        0 likes
        Last Post bltdavid  
        Started by EnveousColnago, Yesterday, 02:10 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Ariana  
        Working...
        X