Ok, so the goal is to figure out how to get all the Vertical Positions AND colors of the oscilators I am using, and draw items based on those things.
So I figured out the vertical position. The colors cannot be referenced by ninja directly. I was messing around with some print commands in various parts of the ORIGINAL indicators..... I stuck a print command in where I think the various colors might be occuring, and I printed arrows on the chart.
Here you can see the red arrows track the color change of the green/black line in the 2nd pane. The red tracks it perfectly, the green was supposed to be there when the line is green, but it is a bit off.
I don't know how to do it yet, but I wonder if I can take and create a function that I can call WITHIN the original code to make these things easily available to be used outside in MY script I am creating?
Got the ERG(that black/green osc) to reflect when the color changes for UP and DOWN now. So I've got an idea how to track it. I still need to find one more item, and that is the tracking of the color of those price bars you see. That's either up or down.
Then it will just be organizing the data in an easy to read format, and finding a way to make it available OUTSIDE of these original indicators.
you ought to add this [CODE*TickSize][/CODE] so it will look like this:
Not sure if you prefer the arrows on the price panel or not, since the horizontal lines from the Initialize section shouldn't be there if you do.
Also, you might want to create your
as dataseries so that you can reference the prior bar's state. There are ways to use loops to emulate a dataseries (which is over my head). Otherwise, need to find otherways to draw arrows for only when the condition changes (if that's what you prefer to see rather than several continuous bars with the arrow below.
Keep up the good work.
The following user says Thank You to zeller4 for this post:
Thanks Zeller, I had just put the arrows in there so that I could verify that I could get the script to output something when the indicator was doing something. So it was just a flag sort of while I was trying to understand it.
About the data series, that is what I am working on now, so that I can get all the values into my study.
Ok, I have access to 6 of the 7 variables I need to base my logic on.
I didn't realize it, but the first 6 are "exposed variables" put into data series that are easily available. The 7th variable is the color of the bars, I may have to actually create inside the original indicator?
Here are some pictures, and the arrows are just there to show that I am tracking the state change of each indicator whether it is a color or the level.
The following user says Thank You to forrestang for this post: