Announcement

Collapse
No announcement yet.

Multiple timeframe & 2 different technical indicators

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

  • Multiple timeframe & 2 different technical indicators

    Can anyone assist me with the following:

    I am trying to write an efs that looks at the same stock symbol in a 3 minute and a 10 minute timeframe.

    I am using both Stochastics for the 3 min timeframe and MACD for the 10 minute timeframe.

    Here is what I am attempting to accomplish

    e.g. when the 3 min Stochastics crosses down, and at the same time the 10 min MACD turns down, I am hoping to get an alert that tells me that both conditions have been met. However based on the timeframe interval, it is possible for the 10 min MACD to turn down and stay in that position, where as the 3 min Stochastics could actually move 3 bars and still potentially meet my criteria.

    I am even OK if I receive multiple alerts for the same condition.

    I have attempted to write an alert on a 10 minute interval, but because it is only checking every 10 mins, it is possible that it will miss this combined condition.

    I have also attempted to write an alert on the 3 minute interval, but if the efs is written and resides on a 3 minute chart, I do not know how to get the efs to check the MACD, every 10 minutes.

    I keep hearing that multiple timeframe efs's will become easier with EFS2. Does anyone have a similar example to what I am trying to accomplish here, and might be kind enough to share, or if anyone can tell me if this can be accomplished in EFS2, if yes, can you point me in the right direction to write a proper EFS.

    Sincerely

    Royce

  • #2
    Re: Multiple timeframe & 2 different technical indicators

    Hello Royce,

    Originally posted by Royce
    Can anyone assist me with the following:

    I am trying to write an efs that looks at the same stock symbol in a 3 minute and a 10 minute timeframe.

    I am using both Stochastics for the 3 min timeframe and MACD for the 10 minute timeframe.

    Here is what I am attempting to accomplish

    e.g. when the 3 min Stochastics crosses down, and at the same time the 10 min MACD turns down, I am hoping to get an alert that tells me that both conditions have been met. However based on the timeframe interval, it is possible for the 10 min MACD to turn down and stay in that position, where as the 3 min Stochastics could actually move 3 bars and still potentially meet my criteria.

    I am even OK if I receive multiple alerts for the same condition.

    I have attempted to write an alert on a 10 minute interval, but because it is only checking every 10 mins, it is possible that it will miss this combined condition.
    You could try looking at an interval lower that 10 minutes.

    Alternatively, you could remove the BARSTATE_NEWBAR condition on the 10 minute condition and allow the evaluation to occur on each 3 minute bar. However, you need to be willing to live with false signals. Meaning that your 10 minute condition may be true at one of the 3 minute junctures but be false once the 10 minute interval has completed. If you then reload the study, the historical signals will not be the same as what gets evaluated in real time. This is because in real time EFS can see the values during the development of the current 10 minute bar, but in back testing or upon a formula reload the EFS only sees completed bar values.

    I have also attempted to write an alert on the 3 minute interval, but if the efs is written and resides on a 3 minute chart, I do not know how to get the efs to check the MACD, every 10 minutes.
    Try looking for the BARSTATE_NEWBAR condition using getBarStateInterval("10").

    if (getBarStateInterval("10") == BARSTATE_NEWBAR) {
    // check your condition
    }

    []I keep hearing that multiple timeframe efs's will become easier with EFS2. Does anyone have a similar example to what I am trying to accomplish here, and might be kind enough to share, or if anyone can tell me if this can be accomplished in EFS2, if yes, can you point me in the right direction to write a proper EFS.

    Sincerely

    Royce
    Please post the formula code you're working with so I or someone can offer more specific guidance.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      MACD on Set time intervals

      Here is a common var setting that I use with Stochastics:

      var vStK3_01 - stochK(14, 3, 3, inv(3));

      is it possible to do the same with MACD

      e.g.

      if((vMACD.getValue(MACDStudy.MACD, inv(3)) > (vMACD.getValue(MACDStudy.MACD, inv(3),-1)))) {
      Alert.addToList(getSymbol()+" "+getInterval(),"UP- Confirms MACD 3 min is heading upward - TEST !!!"+close(),Color.black,Color.green);
      Alert.playSound("Ding.wav");
      }

      Royce

      Comment


      • #4
        From my earlier post, I am looking to be able to set the time interval to check when MACD is moving in a direction I am looking for.

        Thanks

        Royce

        Comment


        • #5
          Found my Answer

          After further digging and testing, I was able to figure out how to get MACD calculations to work out based on the timeframes I wish to specify. Thanks to anyone who may have taken the time to read my post. I will be testing in the morning.

          Royce

          Comment

          Working...
          X