Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

signal end of the day without waiting the open of the next day

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

    signal end of the day without waiting the open of the next day

    Hi

    i wrote a script to detect the divergence between the price and the Rsi. Each time there is a divergence (bullish or bearish), the script send me an email, to alert me.

    i tried to run this script on daily on the 500 equities of the S&P to get after the close an email with all the equities where there is a divergence.

    My problem is that i wrote the script CalculateOnBarClose=true, and the email is sent after the open of the next day, not on the close of [0].

    in fact, i want to receive the emails after the US session like that i have all the morning (French time) to verify the signals and to select the best oppotunities.

    I tried with CalculateOnBarClose=false but i receive a thousand emails... is there a solution to get the signal without waiting the open on the next day bar ?

    Thx

    #2
    Hello Thomas79,

    Thank you for your post.

    Since, the Close of a bar is not set until the next bar is created, which is the open of the next day.

    What you want to do is then create a method that is checking the current time of the PC clock (DateTime.Now) to a set time, say after the close, and then sending you that email you want.

    I have attached an example of how this is done.

    Let me know if I can be of further assistance.
    Attached Files
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Hi Cal

      thx for your answer but when i download i have a attachment.php on my download directory
      what i have to suppose to do with it ? make a import Ninja script ?

      Comment


        #4
        Thomas79,

        Try this .Zip instead and import it into NinjaTrader


        * ownload the indicator to your desktop, keep them in the compressed .zip file.
        * From the Control Center window select the menu File> Utilities> Import NinjaScript
        * Select the downloaded .zip file
        * NinjaTrader will then confirm if the import has been successful.


        Critical - Specifically for some indicators, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'
        Attached Files
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          ok thx

          can i use this on a strategy script instead of an indicator script ?

          Comment


            #6
            Thomas79,

            Yes, exact same setup would apply for a strategy
            Cal H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            560 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            325 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            547 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            547 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X