Announcement

Collapse
No announcement yet.

How to change values in draw..()

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

  • How to change values in draw..()

    Hi,
    I would like to show the same values in any draw function, as they are in an array.
    Like TodayHigh if I want its value to be shown in drawabsolute() but to reflect the value of a day I'm on?

    Thank's,

    Baruch

  • #2
    Re: How to change values in draw..()

    Baruch

    I would like to show the same values in any draw function, as they are in an array
    Which array are you referring to? The return array?
    In that case all you need to do is insert as the text parameter of the drawTextXxx() function the variable that is returned by the script and that contains the value you want to print on the chart

    I want its value to be shown in drawabsolute() but to reflect the value of a day I'm on?
    You need to provide further details as it is not clear what you are trying to accomplish
    Alex


    Originally posted by baruchs
    Hi,
    I would like to show the same values in any draw function, as they are in an array.
    Like TodayHigh if I want its value to be shown in drawabsolute() but to reflect the value of a day I'm on?

    Thank's,

    Baruch

    Comment


    • #3
      Thanks Alex for your effort.
      It's not what I meant.
      I'll try to ask again.
      Lets say I return bar's closing price. Now if I move the mouse to previous bars I will see in a "cursor window" the closing price of the bar the mouse is pointing at.
      What I want is to show it on the "price screen" or on a separate pan.
      I understand that main() will not run if I go backwards and "draw functions" are placed in main(), so is there another way?

      Regards,

      Baruch

      Comment


      • #4
        Baruch
        If the issue is that you cannot use the Cursor Window because you are not returning these values to the chart then keep in mind that you can return an item to the Cursor Window without necessarily plotting it. To do that just convert the returned item to a string. EFS will not plot strings but will return them to the Cursor Window
        Anyhow to answer your question to my knowledge there isn't a way to scroll the cursor on the chart and have that action update text drawn on the chart using any one of the draw functions. You may be able to accomplish that task by clicking on the chart and using one of the mouse functions (see the link for the description syntax and some examples for these functions). That way you would be able to determine the bar index of that bar and then reference that to the arrays or series you are maintaining. If you search the forums you should find some threads (such as for example this one or this one) on this subject as it has been discussed before
        Alex


        Originally posted by baruchs
        Thanks Alex for your effort.
        It's not what I meant.
        I'll try to ask again.
        Lets say I return bar's closing price. Now if I move the mouse to previous bars I will see in a "cursor window" the closing price of the bar the mouse is pointing at.
        What I want is to show it on the "price screen" or on a separate pan.
        I understand that main() will not run if I go backwards and "draw functions" are placed in main(), so is there another way?

        Regards,

        Baruch

        Comment

        Working...
        X