Hallo,
ich bin an dem selben Problem. Gibt es eine Lösung zu dem Ansatz hier?
Code:
void Historie()
{
double bapairprofitloss=0,babuyprofit=0,basellprofit=0;
int cnt;
for(cnt=0;cnt<OrdersHistoryTotal();cnt++)
{
if(OrderSelect(cnt,SELECT_BY_POS,MODE_HISTORY))
if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magicnummer)
if(OrderType()==OP_BUY )babuyprofit=babuyprofit+OrderProfit()+OrderSwap()+OrderCommission();
if(OrderType()==OP_SELL)basellprofit=basellprofit+OrderProfit()+OrderSwap()+OrderCommission();
bapairprofitloss=babuyprofit+basellprofit;
Print("Gewinn fuer Magicnr",Magicnummer,": ",bapairprofitloss);
}
}