I am trying to output something like that in the journal
founds = Eureka1
founds = Eureka2
founds = Eureka3
founds = Eureka4
...
This is the part of the code where i get error.
Print(format('founds = %.4f',[Eureka [found]]));
Can someone help me?
Code: Select all
procedure GetSingleTick; stdcall;
var
limitB, limitS, stopB, stopS, stop, limit:double;
found :integer;
total, k, l, telos:integer;
DistanceB, Distances, SL, TP:double;
Eureka:integer;
begin
// check our currency
if Symbol <> string(Currency) then exit;
// set currency and timeframe
SetCurrencyAndTimeframe(Symbol, TimeFrame);
if (Open(0) = Close(0))
and (Open(0) = High(0))
and (Open(0) = Low(0))
and (Close(0) = High(0))
and (Close(0) = Low(0))
and (High(0) = Low(0)) then
begin
total:=0;
found:=0;
if (OrdersTotal()<>0) then
total := OrdersTotal();
while (total <> -1) do
begin
if OrderSelect(total, SELECT_BY_POS, MODE_TRADES) then
if (OrderSymbol()=Currency) then
if OrderProfit() >0 then
begin
Print(Currency) ;
Print(format('Profit = %.4f', [OrderProfit]));
Print(format('Open Price = %.4f', [OrderOpenPrice]));
Print(format('LIMIT = %.4f', [OrderTakeProfit]));
Print(format('STOP = %.4f', [OrderStopLoss]));
Print(format('Ticket = %d', [OrderTicket]));
found:=found+1;
Print(format('founds = %d',[found]));
Print(format('founds = %.4f',[Eureka [found]]));
end;
total:=total-1;
end;
end;