Announcement

Collapse
No announcement yet.

middleDonchian

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

  • middleDonchian

    Hi,

    Could somebody please give me a brief explanation of barIndex in the context of below. I guess it isn't as simple as inputting -1 to get the last bar data rather than the current ? (Like offset)

    middleDonchian( length [, source | sym() | inv()] [, barIndex] )

    Thanks

    Roger

  • #2
    Roger
    In EFS2 you can create a series and then retrieve a specific value in that series. To do this you would first declare the object
    var myMidDonchian = middleDonchian(20)
    at which point you can retrieve a single value (for example the value of the middle Donchian of two bars ago)
    var vMidDonch_2 = myMidDonchian.getValue(-2)
    However you can also retrieve the value directly without creating the series. In that case you would write it as
    var vMidDonch_2 = middleDonchian(20,-2)
    where -2 is the barIndex
    Alex

    Comment


    • #3
      Thanks Alex, I will investigate further then. I am actually looking at your most recent Ichimoku script, and I am trying make a few subtle changes (colours and alerts) which I can release here when I am successful with a full explanation.

      Comment

      Working...
      X