Hello, I'm trying to code the following,
if the close is above moving average stay 60% invested in s&p500 if the close is below moving average stay 40% invested in s&p500 I'm not sure I get correct results. Buy=true; sell=cross(ma(c,200),c) or cross(c,ma(c,200)); positionsize=IIf (c>ma(c,200),-60,-40);
