Bar colour scripting

Hello,

I’m new here and I am not sure what is possible in Optuma scripting language. Could below be achieved with it and how difficult would it be to code?

(only show on monthly timeframe)

If the price is below the low of the previous year = red candles

If the price is above the high of the previous year = green candles

If the price is between the high and low of the previous year = grey candle

 

(only show on weekly timeframe and below)

If the price is below the 50sma and 20sma = red candles if the price is below the 50sma and above 20sma = grey candles

(only show on weekly timeframe and below)

If the price is above the 50sma and 20sma = green candles, if the price is above the 50sma and below 20sma = grey candles

It seems you have deleted your Optuma account, but for the benefit of others it’s quite easy, eg below the low of the previous year:

CLOSE()<LOW(Year(PERIODAMOUNT=1))[1]

More on custom bar colours here: https://help.optuma.com/kb/faq.php?id=648