代码编译时出现错误

 
 double totalProfitLoss = 0;

    // 获取当前时间
    datetime now = TimeCurrent();
    
    // 选择所有历史订单
    HistorySelect(0, now);

    int totalOrders = HistoryOrdersTotal();

    // 确保处理的订单数量不超过实际订单数量
    int startOrder = totalOrders - numberOfOrders;
    if (startOrder < 0) startOrder = 0;

    // 遍历最近的订单
    for (int i = totalOrders - 1; i >= startOrder; i--)
    {
        ulong orderTicket = HistoryOrderGetTicket(i);
        if (orderTicket > 0)
        {
         totalProfitLoss = HistoryOrderGetDouble(i,ORDER_SYMBOL);
        }
    }

这段代码编译时出现错误:'HistoryOrderGetDouble' - no one of the overloads can be applied to the function call trail_ea6.mq5 743 29

谁来更正一下


 
sdfgsdgdsgdsvsg:

这段代码编译时出现错误:'HistoryOrderGetDouble' - no one of the overloads can be applied to the function call trail_ea6.mq5 743 29

谁来更正一下


for (int i = totalOrders - 1; i >= startOrder; i--)
 {
    ulong orderTicket = HistoryOrderGetTicket(i);
    if (orderTicket > 0)
     {
      totalProfitLoss = HistoryOrderGetDouble(orderTicket,ORDER_TP);
     }
 }
 
Xiaoyu Huang #:
谢谢,问题解决了