15 min system , need help coding candle indicator please

 

Hi,

I have an idea for a 15 min trading system, i am looking for someone to help me code an indicator that will colour in the candles as shown .

when the price goes above the 50 ema level 50 its green candle,

when the price goes below the 50 ema level -50 its red candle,

when the price is not crossed the 50 levels above or below the candles are yellow

see the picture below to see what I mean

can someone please help

thanks

Files:
 
jamesagnew717:
Hi,

I have an idea for a 15 min trading system, i am looking for someone to help me code an indicator that will colour in the candles as shown .

when the price goes above the 50 ema level 50 its green candle,

when the price goes below the 50 ema level -50 its red candle,

when the price is not crossed the 50 levels above or below the candles are yellow

see the picture below to see what I mean

can someone please help

thanks

If you use 50 as the offset it means that most if not all the candles are inside the channels ( your MA Channel looks different to mine? ) so I have set the posted example to a +-15 offset. It is also MTF and has a basic candle color resize code so if you find the candle colors stop resizing correctly ( usually because the chart size puts the candle resize outside of the auto adjustment range ) simply set the Automatic_CandleSize = false to use a manual candle size.

ma_candleschannel.ex4

Files:
Reason: