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 Mestor, 03-10-2023, 01:50 AM
      16 responses
      388 views
      0 likes
      Last Post z.franck  
      Started by rtwave, 04-12-2024, 09:30 AM
      4 responses
      31 views
      0 likes
      Last Post rtwave
      by rtwave
       
      Started by yertle, Yesterday, 08:38 AM
      7 responses
      29 views
      0 likes
      Last Post yertle
      by yertle
       
      Started by bmartz, 03-12-2024, 06:12 AM
      2 responses
      22 views
      0 likes
      Last Post bmartz
      by bmartz
       
      Started by funk10101, Today, 12:02 AM
      0 responses
      7 views
      0 likes
      Last Post funk10101  
      Working...
      X