im looking to create a script that will allow me to plot a green or red icon of some sort (ideally just a small circle) above or below respectively if specific criteria are met. i dont think im explaining it well enough to chatgpt, or what im looking for just doesnt exist. i am looking to have a green dot plotted above each candle if that candle or the last dominance candle was bullish. if the last dominant candle was bearish i would like for a red dot to be plotted below that candle.
i have added below what ive completed (possibly incorrect) thus far:
i have added below what ive completed (possibly incorrect) thus far:
Code:
# 5 period average volume
Def 5avgvol = average(volume,5);
Def domcan = volume >= 5avgvol;
# Each candle has a certain amount of buying volume and selling volume
Def Buyingvolume = ((close – low) / (high – low)) * volume;
Def Sellingvolume = ((high – close) / (high – low)) * volume;
# Each individual candle is defined as “Bullish” or “Bearish”
Def Bullish = Buyingvolume > Sellingvolume;
Def Bearish = Sellingvolume > Buyingvolume;
Def Neutral = Buyingvolume = Sellingvolume;
# is the prior dominant candle bullish or bearish
Def BullDom = domcan and bullish;
Def BearDom = domcan and bearish;
Def NeutDom = domcan and Neutral;
Last edited by a moderator: