移动止损出错

If( MarketPosition>0 And High > EntryPrice + (a+2)*moveprice* MinMove*PriceScale And high < EntryPrice + (a+3)*moveprice*MinMove*PriceScale) { my_exitprice_1=EntryPrice + (a+1)*moveprice*MinMove*PriceScale; a==a+1; } If( MarketPosition<0 And Low < EntryPrice - (a+2)*moveprice* MinMove*PriceScale And Low > EntryPrice - (a+3)*moveprice* MinMove*PriceScale) { my_exitprice_1=EntryPrice - (a+1)*moveprice*MinMove*PriceScale; a==a+1; }老师,我想写一个移动止损的策略,就是利润每上升一个单位,平仓线my_exitprice也跟着上升一个单位,a的初始值是-1,但是这个平仓线只上升一次后面就不再上升了,请问是什么原因?谢谢

谢谢王老师解答,我改成了a=a+1了,但是平仓线还是只上升了一次后面就不再上升了,变量a的定义是Numeric a(-1);有错吗?

==是判断等于赋值是=