开仓后,第25分钟的时间是OrderOpenTime( ) +25*60
所以比较就用 if (TimeCurrent() > (OrderOpenTime( ) +25*60))判断时间是否到达
时间转数组下标用int iBarShift( string symbol, int timeframe, datetime time, bool exact=false)
for(i=0;i<OrdersTotal();i++)
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{
if(OrderSymbol()==Symbol() && OrderType()==OP_SELL) { sell_profit+=OrderProfit(); sell_points+=Ask-OrderOpenPrice();}
if(OrderSymbol()==Symbol() && OrderType()==OP_BUY) { buy_profit+=OrderProfit(); buy_points+=Bid-OrderOpenPrice();}
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。