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

Multiple Time Frame Coding

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

  • Harry
    replied
    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.

    Leave a comment:


  • NinjaTrader_CalH
    replied
    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.

    Leave a comment:


  • rzeemeijer
    started a topic Multiple Time Frame Coding

    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

Latest Posts

Collapse

Topics Statistics Last Post
Started by bmartz, 03-12-2024, 06:12 AM
4 responses
31 views
0 likes
Last Post bmartz
by bmartz
 
Started by Aviram Y, Today, 05:29 AM
4 responses
11 views
0 likes
Last Post Aviram Y  
Started by algospoke, 04-17-2024, 06:40 PM
3 responses
28 views
0 likes
Last Post NinjaTrader_Jesse  
Started by gentlebenthebear, Today, 01:30 AM
1 response
8 views
0 likes
Last Post NinjaTrader_Jesse  
Started by cls71, Today, 04:45 AM
1 response
7 views
0 likes
Last Post NinjaTrader_ChelseaB  
Working...
X