Here is the code I wrote to draw the base candle in yellow but I get an error message.
// Define variables
vars:
Range(0), // Range of the candle
BodySize(0), // Size of the candle body
CandleColor(black); // Color of the candle (default)
// Calculate the range and body size
Range = high – low;
BodySize = abs(open – close);
// Check if the body is less than 50% of the range
if BodySize < (Range * 0.5) then
CandleColor = yellow; // Change the color to yellow for the base candle
// Set the candle color
PlotColor(1, CandleColor);