Announcement

Collapse
No announcement yet.

drawShapeRelative() can only be used once per main()?

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

  • drawShapeRelative() can only be used once per main()?

    Hi
    It took me a while to work out why some shapes were missing from my indicator.

    Why can't I call drawShapeRelative() more than one per main()? If I do call it more than once (my indicator can find multiple "events" in a bar), I see only the shape for last call executed.

    I note that I'm not limited to one shape per bar as I can use the relative x value to offset them (but can't do that twice in main()).

    Shouldn't this limitation be fixed or documented?

    What should I expect with other draing functions?

    Thanks

  • #2
    Dave180
    You can call drawShapeRelative() as many times as you wish. The reason you are only getting the last one called is because you are not using a tagID unique to each graphic object (see the link to the article in the EFS KnowledgeBase for the description and syntax of the function)
    Alex

    Comment


    • #3
      Thanks, yes, works now, but I still say the documentation is deficient, there is no (obvious?) mention that the tag is required in this circumstance. I didn't need the tag, it is optional, so I didn't include it.

      Comment


      • #4
        Dave180
        The parameter is optional as it is not required if you are applying a single graphic object. However if you apply more than one graphic object you need to provide a way for the formula engine to be able to identify/track each object.
        I believe this subject is covered in detail in the Guide to Developing EFS Graphics which is in the EFS KnowledgeBase under Help Guides and Tutorials
        Alex

        Comment


        • #5
          Thanks, I note "more than one graphic object... " is per main() - you don't need a tag to put one symbol on each bar, you do need it for more than one per main().

          Thanks for the doc reference though, I hadn't found that before.

          Dave

          Comment


          • #6
            Test

            Dave180

            I note "more than one graphic object... " is per main() - you don't need a tag to put one symbol on each bar, you do need it for more than one per main().
            That is correct. My reply was in fact in reference to the title of the thread
            Alex

            Comment

            Working...
            X