Announcement

Collapse
No announcement yet.

How to define and express a custom study?

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

  • How to define and express a custom study?

    Could someone please explain how to define and express a custom study?

    For example, to express the value of the custom study in the prior bar vs. the value of the custom study in the current bar, (e.g. vMT(-1) < vMT()), how is that done?

    Attached is a formula with a custom study having the var name vMT. The formula output window reports no syntax errors, but I get no background color, so something's not right.

    Sure looking forward to that EFS Manual.

    Thanks in advance.
    Attached Files

  • #2
    I can't really explain why, but the attached now changes the background color based on the relationship btwn "vMt(-1)" and "vMT(0)"
    Attached Files

    Comment


    • #3
      Lancer,

      The use of ref() can possibly be of help here. CustomFuncRef.efs which contains a great example of using ref() can be downloaded from here. There is also another thread on the topic here.
      Regards,
      Jay F.
      Product Manager
      _____________________________________
      Have a suggestion to improve our products?
      Click Support --> Request a Feature in eSignal 11

      Comment


      • #4
        dloomis,

        That's a mystery to me. How is it that by adding "old" to the variable name vMT that it is recognized as representing a value for the previous bar? I was trying to express it as vMT(-1) for the previous bar, and vMT(0) for the current bar, but getting no results (no background color).

        I don't understand why your formula works while the standard conventions (-1) and (0) do not. Is "old" recognized in Javascript as referring to the previous bar when "old" is added to a variable name?

        Also, there's the line vMTold=VMT which is also odd because vMT is the value of the current bar while vMTold is the value of the previous bar. Why is vMTold defined as vMT when they're supposed to represent two different values?

        Comment


        • #5
          Addig 'old'creates a new variable which stores the current vlaue of the valriable for use during the next iteration of the efs file.

          Like I said, I dont know why the -1 doesnt work in this case, but it apparently doesnt.

          Comment

          Working...
          X