Here is what I want to do.
puts inputs:
as n, say n =3.
Then do these things:
1) Take the average of the 'High' of the past 3(n) candles = RangeHigh
2) Take the average of the 'Low' of the past 3 (or n) candles = RangeLow
3) Then get the median or the RangeHigh & RangeLow; such as Median = ((RangeHigh + RangeLow)/2)
4) Then simply define: if Median is less than close of current bar; then that means 'Up, positive" Then using that make background Blue and/or candles Blue
5) Then on the other side if Close < Median, then 'White'
---
it would look somethign like this but in NinjaScript Language
h=high
l=low
rangehigh = Average((h, n));
def rangelow = Average((l, n));
median = ((rangehigh + rangelow) / 2);
updirection = if c > median then paint Blue;
downdirection = if c < median then paint White;
----
I was able to find a way to change the backgrounds using BackBrushAll (per below) but not sure how to execute what I want to do here into this... I know it is not comlicated for most people here but really need help to get started.
PlotBrushes[0][0] = Brushes.White;
BackBrushAll = Brushes.Blue;
BackBrushAll = null;
BackBrushAll = Value[0] >= 0 ? Brushes.Blue : Brushes.White;
Thanks would really appreciate any help I can get.

Comment