Announcement

Collapse
No announcement yet.

Higher Time Frame Called from Lower time frame of same study

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

  • Higher Time Frame Called from Lower time frame of same study

    Quick question

    I thought I knew how to do this, but as I start looking close to it felt i don't.

    I want to for example create an efs that runs on a lower time frame chart, lets say a 1 min. From this same EFS on the 1 min, I want to reference this same EFS running on a 3min and peek into what value it is currently plotting(really a trend statement) and compare this value to a value on the 1min. This would be a type of recursive call to the same EFS but with a different time frame. Can someone point me to an example of and EFS calling itself from a different time frame?

    Thanks

    Todd

  • #2
    I've just recently done this for another client whereas we have an EFS running on a higher time frame chart that is feeding data to a tick chart. The way I've accomplished this is with TEXT FILES and setGlobalValue().

    For example, when you reload the EFS on the higher time frame chart, it creates a TEXT FILE for all the analysis of the historical bars. When it reaches the current bar, it continues to update the text file, but also creates a GLOBAL VALUE of the current analysis.

    Now, in the tick chart, I have code that reads the historical text file for the older bars (and verifies the data based on a date/time stamp), then when it gets to the current bar, I pull the GLOBAL VALUE and parses the data.

    For example,

    setGlobalValue("YourCustomStudy", "date, time, value1, value2, value3, value4");

    Now, you just have to GET the global value and parse it.

    This is one of the easiest ways to accomplish what you want in REALTIME as passing a string to a global value allows you to pass lots of data in one value.

    I'll try to find some code examples soon.
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment

    Working...
    X