plotting from a function

Questions about MultiCharts and user contributed studies.
janus
Posts: 835
Joined: 25 May 2009
Has thanked: 63 times
Been thanked: 104 times

plotting from a function

Postby janus » 14 Jun 2009

I'm using plotn extensively to display various things. However, it's becoming a pain as I also use function calls extensively by following best practices in coding to keep my coding well structured. I'm hampered in doing do as I can't call the plotn functions from a function, only from an indicator. Yet I can draw lines and text from a function, which is what I was doing before to do the same thing. However, drawing lines (which are trend lines) is too resource hungry so plotn is a better way for me. For now I have to resort to calling a function to perform the necessary calculations and returning the plotx,ploty coordinates to the indicator where I call plotn. It would be so much better to allow one to call plotn from withing a function. Am I missing something here?

An alternative is to have another line drawing function that's a lot less resource hungry that the trend line. All is required are the start and end points to draw such a simple line, plus just have line color, line width and linestyle attributes.

Perhaps an even better way is to be able to call an indicator from an indicator, but for the purposes of what I'm doing that would be overkill. It may have other benefits though.

Return to “MultiCharts”