• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Time Frame Coding

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

  • 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

  • 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:

Latest Posts

Collapse

Topics Statistics Last Post
Started by StealthM93, Today, 07:58 PM
0 responses
2 views
0 likes
Last Post StealthM93  
Started by Mykro, Today, 11:01 AM
1 response
5 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by bauerjj10, Today, 12:24 PM
1 response
12 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by Newtrader101, Today, 06:01 PM
1 response
6 views
0 likes
Last Post NinjaTrader_EricB  
Started by Steve L, Today, 03:50 PM
1 response
9 views
0 likes
Last Post NinjaTrader_ChelseaB  
Working...
X