Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Fine-tuning my custom indicator

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

    Fine-tuning my custom indicator

    Hi,

    I created an indicators which sends me email alerts whenever the completed candle includes the value of a moving average, SMA(30). I typically use that on a 60 min charts.

    I recently ran into an issue where it would have been nice to get the alert 15 minutes prior the the 60 min bar completion.

    I can think of two solutions:

    1. CalculateOnBarClose = false, but in that case I need to tell the script to send me an email alert only once and hold on for a while, or else I will end up will hundreds of emails, one for every incoming tick where the 60 min candle includes the value of SMA(30). Which function/code allows me to do that?

    2. Use a multiple time frame approach where I would use the indicator with CalculateOnBarClose = true on a 15 minutes chart. But the indicator would check for the occurrence of 60_min_in_progress_candle = SMA(30). Can this be done?

    Thanks in advance.

    -MarcusPlexus

    #2
    marcusplexus, you can work with bool flag for your first question to just send the alert one time in realtime when your condition is 'true', of course you need to reset the bool then on the next bar to make the alert 'rearm'.

    The second approach can also be done, work with CalculateOnBarClose = false and monitor the first tick of your 15 min bar then to check for your conditions -

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Ok. I have the information I need to fix my problem.

      Thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by GussJ, 03-04-2020, 03:11 PM
      11 responses
      3,227 views
      0 likes
      Last Post xiinteractive  
      Started by andrewtrades, Today, 04:57 PM
      1 response
      13 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by chbruno, Today, 04:10 PM
      0 responses
      7 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Started by josh18955, 03-25-2023, 11:16 AM
      6 responses
      440 views
      0 likes
      Last Post Delerium  
      Started by FAQtrader, Today, 03:35 PM
      0 responses
      12 views
      0 likes
      Last Post FAQtrader  
      Working...
      X