Announcement

Collapse
No announcement yet.

adding bands to Stochastics

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

  • adding bands to Stochastics

    Hello

    I have created a simple Stochastics.

    I am trying to add upper and lower bands like this...

    addBand( Upper, PS_SOLID, 2, Color.black,"Upper");
    addBand( Lower, PS_SOLID, 2, Color.black,"Lower");

    I would think it has to go into function main area.....but everywhere I add it in I get an error.

    Can someone point me in the right direction?

    Thanks

    Pogman
    Attached Files

  • #2
    Pogman
    The reason you are getting an error is because you have not assigned a value to the Upper and Lower variables (the first parameter in each of the addBand() commands).
    Either replace Upper and Lower with a fixed value or declare Upper and Lower as variables and assign them a value.
    If you want to make those user adjustable vatiables then use a FunctionParameter Object
    As an example of the latter see the customStoch.efs that is included in the EFS2 Custom folder
    Alex

    Comment


    • #3
      Still errors

      HI Alex

      Thanks for the reply. follwed your suggestions and looked at customStoc, and as well assigning a value. So I have tried to replace upper and lower with a value in () e.g. 80 and 20 and still I get errors.

      The attached file has the new code in line 44-55 with the stochastic working but still no upper and lower bands, but no error messages?

      I know your suggestions are right on but I still can not grasp your answers. Sorry, any other tips?

      Thanks
      Pogman
      Attached Files

      Comment


      • #4
        Found a similar efs

        Hello

        Found a similar efs and modified the code to get what I need. this stoc has bands etc.

        find it attached here.

        thanks for your help Alex

        Pogman
        Attached Files

        Comment


        • #5
          stochastic efs

          found another stochastic color bar with bands here for those interested.
          Pogman
          Attached Files

          Comment

          Working...
          X