Announcement

Collapse
No announcement yet.

bressert.efs adjustment help

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

  • bressert.efs adjustment help

    Can someoneplease look at the attached file.
    For the varaibles dss and EMA2 i want to be able to put in a condition for color coding my bars based on whether the dss value of the previous bar is either equal to a greater than the ema2 value of the previous bar as in

    if(dss(-1)<ema2(-1))
    when i put this expression in the efs i get an error
    However when i put in conditon of if dss>ema2 for the same purpose my efs works fine.
    Is there another set of variables i need to define to set this up
    such as dssprev=dss.getvalue( xxx. ,-1) . If so can you show me the proper expression.
    Thanks to everyone on this board ive have immensely improved my knowledge of programming in the javascript but i obviuosly have much to learn still.
    Attached Files

  • #2
    I added

    a line to preMain; which is definitly needed to control color bars,

    defined 4 new variables dss, dssold, EMA2 EMA2old outside main(0 and preMain() - I was hoping this would allow the use of dss(-1) and EMA2(-1), but it didnt

    added setDefaultPriceBarColor( Color.green ); to main()

    saved dssold and EMA2 for the next iteration toward the bottom of the program - used this technique because (-1) didnt work.

    removed a var EMA2 statement from main - because I defined it outside main and you dont want to define vars twice - I think redefining a var in main wipes out the stored velaue because the var is reiniitlaized
    Attached Files

    Comment


    • #3
      thanks dloomis

      Comment

      Working...
      X