Announcement

Collapse
No announcement yet.

Donchian Study statement

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

  • Donchian Study statement

    Hello,

    I want to create a complex statement(shown right below) but it doesn't work. The reason why I want one line is so I can change the 27 to a counter and change the parameters over and over drawing lines.
    temp= study.getValue(DonchianStudy.BASIS,26,27);



    Instead of doing the following in separate statements:
    TenkanSen = new DonchianStudy(9, 0);


    var nTurningLine = TenkanSen.getValue(DonchianStudy.BASIS);

    Can someone assist me here?

    -Manesh

  • #2
    Hello Manesh,

    I don't think you will be able to do what you need all in one line. At any rate, you should use the new Donchian studies.


    PHP Code:
    var xBasis null;

    function 
    main(nIndex) {
        if (
    nIndex == nullnIndex = -27;
        if (
    xBasis == nullxBasis middleDonchian(9);

        return 
    xBasis.getValue(nIndex);

    You can use the "nIndex" variable as a formula parameter to change through Edit Studies the value from the series you want to plot. The example above moves the plot forward by 27.
    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