I have this simple Candlestick indicator... Basically just plots an arrow once the conditions are met. I can't seem to have any success in getting the code right in order to plot these simple arrow signals from a 15min chart, but on a 30min chart. I've tried a few different aggregation.period ways and can't get it to stick. Ultimately, I just want to see these arrows on a 30min chart, but off of 15min data.
Any thoughts?
Thanks so much.
Jon
------------------------------------------------------------------------------
Any thoughts?
Thanks so much.
Jon
------------------------------------------------------------------------------
Code:
def total = high - low;
def upper_candle = high - Max(open, close);
def lower_candle = Min(open, close) - low;
def trend_mult = if close >= open then 1 else -1;
def Upper_Sentiment = if total != 0 then 100 - ((upper_candle / total) * 100) else 0;
def Lower_Sentiment = if total != 0 then -100 + (( lower_candle / total) * 100) else 0;
plot UpperWickReversal = if Upper_Sentiment <= 33 and Upper_Sentiment != 0 then Upper_Sentiment else Double.NaN;
UpperWickReversal.SetPaintingStrategy(PaintingStrategy.aRROW_DOWN);
UpperWickReversal.SetLineWeight(4);
UpperWickReversal.AssignValueColor(Color.RED);
plot LowerWickReversal = if Lower_Sentiment >= -33 and Lower_Sentiment != 0 then Lower_Sentiment else Double.NaN;
LowerWickReversal.SetPaintingStrategy(PaintingStrategy.arrow_up);
LowerWickReversal.SetLineWeight(4);
LowerWickReversal.AssignValueColor(Color.Green);
Last edited by a moderator: