Announcement

Collapse
No announcement yet.

prev days H/Ls

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

  • prev days H/Ls

    hello

    im a bit new to esginal and i dont know anything about writing scripts, could someone help me out? I do know how to edit efs but the codes are a bit intimidating..

    I need an EFS that will draw some horizontal lines (different color lines, red dash etc...)

    im interested in prev day high/low and lines 1, 2 and 3 points above AND below them

    and also, prev week h/l , and 2nd, 3rd prev days h/l (example: if today is thrusday i would like to see tues or monday h/l)

    Although i dont know much about coding i think i would be able to modify these given codes if someone help point me in the right direction..

    many thanks
    vu
    Attached Files

  • #2
    and this one
    Attached Files

    Comment


    • #3
      vu
      The simplest way to do what you want is to use the prev High.efs that you posted (and the prev Low.efs which is incliuded in the same folder) and modify them to your needs.
      For example to add lines at 1, 2 and 3 points above and below here is what you would need to do in prev High.efs. Replace the return statement in line 37 ie
      return (vHigh);
      with the following
      return new Array (vHigh, vHigh+1, vHigh+2, vHigh+3, vHigh-1, vHigh-2, vHigh-3);
      If you then want to modify the color, plot type, labels, etc add the required statements in preMain then save the script with a different name so as not to overwrite the original. Once you have done that you can apply a similar logic to the prev Low.efs.
      For the previous week's High instead use the same prev High.efs and replace line 29 ie
      xHigh = high(inv("D"));
      with
      xHigh = high(inv("W"));
      Save the script with a different name so as not to overwrite the original and use a similar logic to modify the prev Low.efs
      With regards to plotting the High and Low of a number of days back you could use the High - Low.efs that is posted here which will allow you to specifiy the lookback.
      If instead you want to plot a specific day based on some condition then see the solution provided in this thread.
      Lastly, if as you indicate you are unfamiliar with programming in efs then you may want to review the JavaScript for EFS video series. This will provide you with a thorough introduction to programming in JavaScript which is at the foundation of EFS. Then go through the EFS KnowledgeBase and study the Help Guides and Tutorials which will provide you with the specifics of EFS.
      Alex

      Comment


      • #4
        WoW!....thank you so much!!


        Comment


        • #5
          vu
          You are most welcome
          Alex

          Comment

          Working...
          X