比如 Buy = Cross(MA(Close,5),MA(Close,20)); BuyPrice = 10; Sell = Cross(MA(Close,20),MA(Close,5)); SellPrice = 10; 这样的代码是怎么执行的呢?
buy, 或者 sell 是bool变量 buyprice, sellprice 执行的价格。 可以这么理解: 当5日均线上穿20日均线时,买入(buy is true),买入的价格是10 当5日均线下穿20日均线时,卖出(sell is true),卖出的价格是10.