Plot signals in single line at top or bottom of chart


Category:
0
0

Hey Pete, its been a while, I hope you’re continuing to improve, yea?

My charts aren’t super busy crazy yet and I continue to cycle out indicators narrowing down my decision making. I have these indicators I like right now but I cant figure out how to move where the chart displays the indicator.

I’m using the “Signal1”, with values being Boolean, drawn as “Down Arrow @ High” so this arrow indicator is very close to the top of the bar. I would ideally like all of these indicators to show up in a single row across the top of my screen. I don’t need it to be dependent on where the bar is I just need to see it and not have it interfere with other arrow indicators I’m already using. besides the code below, I’m also going to apply it to a long version where the arrow points up at the low. I cant imagine this is too difficult but my experimenting has resulted in some funky results.

plot smaOne = Average(close, 4);
plot smaTwo = Average(close, 9);
plot smaThree = Average(close, 18);
def crossShort = high > smaOne and high > smaTwo and high > smaThree and low < smaOne and low < smaTwo and low < smaThree;
plot signal1 = crossShort;
signal1.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
signal1.SetDefaultColor(Color.RED);
signal1.SetLineWeight(5);

Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on January 20, 2020 7:23 pm
91 views
0
Private answer

There is a previous request that is very similar to yours. Trying to plot the signals at the top or bottom of the chart rather than at the high or low of a specific candle.

https://www.hahn-tech.com/ans/horizontal-line-moving-average/

That solution is for the changing colors of the Hull moving average. But the limitations and explanation on potential solutions is exactly the same.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on January 21, 2020 8:53 am