Now that I re-read your description, I think this is what you mean:
dg4prez_batt_meter
StylePtr<Layers<Black,
AlphaL<Layers<
AlphaL<Red,LinearSectionF<Int<5461>,Int<10923>>>,
AlphaL<Yellow,LinearSectionF<Int<16384>,Int<10923>>>,
AlphaL<Green,LinearSectionF<Int<27307>,Int<10923>>>>,SmoothStep<Scale<BatteryLevel,Int<0>,Int<35000>>,Int<-1>>>,
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_BATTERY_LEVEL>,EFFECT_NEWFONT>,
InOutTrL<TrWipe<300>,TrWipeIn<500>,Layers<
Black,
AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<IntArg<EMITTER_SIZE_ARG,2000>,Int<-4000>>>>>>>()
Slightly simpler if a Gradient is ok instead of solid “bars”
StylePtr<Layers<
Black,
AlphaL<Gradient<Red,Red,Yellow,Green,Green>,SmoothStep<Scale<BatteryLevel,Int<0>,Int<35000>>,Int<-1>>>,
TransitionEffectL<TrDoEffect<TrInstant,EFFECT_BATTERY_LEVEL>,EFFECT_NEWFONT>,
InOutTrL<TrWipe<300>,TrWipeIn<500>,Layers<
Black,
AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<IntArg<EMITTER_SIZE_ARG,2000>,Int<-4000>>>>>>>()