Announcement

Collapse
No announcement yet.

Switch Study From Pane To Price Chart

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

  • Switch Study From Pane To Price Chart

    Hi,
    I have written an efs to plot stochastics in a seperate study window, as is usual. And I have also added a variable which the user can select to plot the stoch on top of the price bars.

    The study simply calls preMain() again and the selected variable tells a switch statement that it is to use setPriceStudy( true ).
    Of course, I have to scale the stoch values, etc...not the problem.

    The study works fine and the values are correct if I hard code for either the price window or the study pane. But when I change the variable in Edit Studies, the asked for study does not appear.

    If I had started in a seperate pane, I still have that pane on screen and the stoch plots there with the scaled values, values that tell me that the preMain() settings were accepted. However, the pane never gets removed, and the plot never goes to the price window.

    So, I guess this is a question on how do I get rid of that first setting and completely repaint my screen with the stoch where I want it?

    Thanks for any ideas.

    Bob

  • #2
    Hello Bob,

    The process you are trying to create is not currently possible in EFS. An EFS does not have the ability to remove itself or reapply itself. This is what would have to happen for a study to change itself from a non-price study to a price study. This can only be done manually. The setPriceStudy() preMain function tells the study which pane to appear in during the initialization of the formula. Once a formula has been initialized, calling setPriceStudy(true/false) again will have no affect. Send your idea to [email protected] to have development consider adding some functionality to make this possible.
    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
      Which is Faster?

      Ok Jason, I will send that suggestion on to them.

      In the meanwhile, do you have any idea which would be faster and which would use less computer resources between the following two work arounds?

      In the event that I want both versions on at once (it could happen )

      1- I can write two seperate stoch studies, one to plot in the study pane and one to plot as a price overlay and load them both.

      2- I can write one stoch study to calculate and draw in a study pane and also store the stoch values in a global variable. Then write another study to simply read the global values and plot them as a price overlay.

      Thanks, Bob

      Comment


      • #4
        Hello Bob,

        Choice 1 would be more efficient than choice 2 because you would need to use the setGlobalValue()/getGlobalValue() routine in choice 2.
        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

        Working...
        X