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

Consult about a Method that is a Custom Event

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

    Consult about a Method that is a Custom Event

    I need to code that after market close, the running strategy should be able to send an email with certain info to read. This is simple task when I can trust a method that makes often calls such as OnBarUpdate. The problem is since I want the report after market close, according to the session for stocks, there won't be any more calls until next open. So I must find a way to pull a report with an independent Custom Method. I'm aware that this might require a little bit of programming experience for several difficult examples that I saw. So, I was wondering:

    - Where could I find a simple example of Custom Event Method that depends on the local time. Not a timer, just that acts based on local time.

    Thanks


    #2
    Hello pstrusi,

    What you are asking for would require a Timer, there are no events for the System time.

    Because you want this to happen after the session close you would need to make an event for that purpose. We have a sample of using a timer in the help guide, that would be my suggestion and just set a timer to do 1 event and then stop it. You can set the timer interval to as long is needed and start it on the last bar of the session. The TriggerCustomEvent would also likely be needed there to make sure all values you report in the email are up to date.



    Please let me know if I may be of additional assistance.

    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks for the suggestion Jesse
      Regards

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by GLFX005, Today, 03:23 AM
      0 responses
      1 view
      0 likes
      Last Post GLFX005
      by GLFX005
       
      Started by XXtrader, Yesterday, 11:30 PM
      2 responses
      11 views
      0 likes
      Last Post XXtrader  
      Started by Waxavi, Today, 02:10 AM
      0 responses
      6 views
      0 likes
      Last Post Waxavi
      by Waxavi
       
      Started by TradeForge, Today, 02:09 AM
      0 responses
      12 views
      0 likes
      Last Post TradeForge  
      Started by Waxavi, Today, 02:00 AM
      0 responses
      2 views
      0 likes
      Last Post Waxavi
      by Waxavi
       
      Working...
      X