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

TriggerCustomEvent() for every second?

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

    TriggerCustomEvent() for every second?

    How is this done? I am very confused how this works. Ive tried working with the sample file, but still i am getting excessive orders or it wont work on live sim. I am doing unmanaged orders and need the orders changed if its not filled within a 1 minute time frame.

    #2
    ericson, in the sample you will see the timer being set to 1000Ms or one second. Meaning it would the raise an event in the TimerEventProcesser where you call your method implementing the logic you would want to see taking place at every timer point trigger. To debug and isolate I would separate the timer logic first from the order logic and see at which point you get exactly the unexpected outcomes in your processing. If you are seeing excessive orders then it would suggest your checks are probably not hitting as you expect, as the unmanaged orders would not have any Entryhandling limits like the managed mode, if your condition to submit an order hits it would submit, just like for example the AtmStrategyCreate(). So I feel the issues are separate from the actual timer event calling your logic, as this would just give you an event to fire your own logic consistently from apart from any event based updates we usually only trigger via OnBarUpdate() or the other more advanced handlers.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I just went back to managed orders and no more excessive orders.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mykro, Today, 07:18 AM
      0 responses
      12 views
      0 likes
      Last Post Mykro
      by Mykro
       
      Started by QuantKey_Bruce, Today, 05:39 AM
      1 response
      8 views
      0 likes
      Last Post QuantKey_Bruce  
      Started by higher.high, Today, 06:10 AM
      0 responses
      11 views
      0 likes
      Last Post higher.high  
      Started by McSauce, 05-10-2023, 06:22 PM
      2 responses
      40 views
      0 likes
      Last Post McSauce
      by McSauce
       
      Started by dodoei, 12-25-2020, 11:09 AM
      13 responses
      137 views
      0 likes
      Last Post thehammer  
      Working...
      X