Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Time Frame Coding

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

    Multiple Time Frame Coding

    Hello,

    How do you code the following on a 15 minute chart

    " If EMA 34 on the 6 hour chart is falling and EMA 34 on the 15 minute chart is falling
    and Stochastics 5.3.3 >= 80 and Stochastics 5.3.3 is falling " Then " Play sound....."

    Thx.

    Regards

    Rene

    #2
    Hello Rene,

    Thank you for your post.

    You will want to use the Add(); to add an additional timeframe to the script for calculations

    In the Initialize()
    Add(PeriodType.Minute, 15);


    Please take a look at the link below on programming with Multiple Timeframes and Instruments -
    http://www.ninjatrader.com/support/h...nstruments.htm

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

    Comment


      #3
      Originally posted by rzeemeijer View Post
      Hello,

      How do you code the following on a 15 minute chart

      " If EMA 34 on the 6 hour chart is falling and EMA 34 on the 15 minute chart is falling
      and Stochastics 5.3.3 >= 80 and Stochastics 5.3.3 is falling " Then " Play sound....."

      Thx.

      Regards

      Rene
      You basically have two options.

      -> either you add a 360-min bar series in the Initialize() section of the indicator and perform the EMA calculation for that bar series
      -> or you replace the EMA(34) on a 6-hour chart with the EMA (816) on a 15 minute chart (they are near-identical)

      I would prefer the second option. As the EMA is a recursive indicator, there is no risk that the large period of 816 will slow down the indicator. 816 is the product 24 x 34, because one 6-hour bar can be built from 24 15-min bars. This reasoning can also be applied to a SMA.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by sjsj2732, Yesterday, 04:31 AM
      0 responses
      31 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      286 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      283 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      133 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      91 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X