Skip to content

Commit 340214a

Browse files
committed
fic call of AddHistoryRecord()
[skip ci]
1 parent fbece26 commit 340214a

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

mql40/experts/ZigZag EA.mq4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ bool SynchronizeStatus() {
11881188
double netProfitP = grossProfitP + MathDiv(swapM + commissionM, PointValue(lots));
11891189

11901190
logWarn("SynchronizeStatus(4) "+ instance.name +" orphaned closed position found: #"+ ticket +", adding to instance...");
1191-
if (IsEmpty(AddHistoryRecord(ticket, 0, 0, lots, 1, openType, openTime, openPrice, openPrice, stopLoss, takeProfit, closeTime, closePrice, closePrice, slippageP, swapM, commissionM, grossProfitM, netProfitM, netProfitP, grossProfitP, grossProfitP, grossProfitP, grossProfitP, grossProfitP))) return(false);
1191+
if (IsEmpty(AddHistoryRecord(ticket, 0, 0, openType, lots, 1, openTime, openPrice, openPrice, stopLoss, takeProfit, closeTime, closePrice, closePrice, slippageP, swapM, commissionM, grossProfitM, netProfitM, netProfitP, grossProfitP, grossProfitP, grossProfitP, grossProfitP, grossProfitP))) return(false);
11921192

11931193
// update closed PL numbers
11941194
stats[NET_MONEY][S_CLOSED_PROFIT] += netProfitM;

mql40/experts/tools/HtmlReport2Chart.mq4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ bool UpdateHistoryRecord(int ticket, double stopLoss, double takeProfit, datetim
524524
int size = ArrayRange(history, 0);
525525

526526
// find the ticket to update
527-
for (int i=size-1; i >= 0; i--) { // iterate from the end (in most use cases faster)
527+
for (int i=size-1; i >= 0; i--) { // iterate from the end (in most cases faster)
528528
if (ticket == history[i][H_TICKET]) break;
529529
}
530530
if (i < 0) return(!catch("UpdateHistoryRecord(1) ticket #"+ ticket +" not found", ERR_INVALID_PARAMETER));

mql40/include/rsf/experts/trade/AddHistoryRecord.mqh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ int AddHistoryRecord(int ticket, int fromTicket, int toTicket, int type, double
3636
if (isPartial) {
3737
// resolve the partialClose[] index to insert at
3838
int size = ArrayRange(partialClose, 0);
39-
for (int i=size-1; i >= 0; i--) { // iterate from the end (in most use cases faster)
39+
for (int i=size-1; i >= 0; i--) { // iterate from the end (in most cases faster)
4040
if (ticket == partialClose[i][H_TICKET]) return(_EMPTY(catch("AddHistoryRecord(1) "+ instance.name +" cannot add record, ticket #"+ ticket +" already exists (partialClose["+ i +"])", ERR_INVALID_PARAMETER)));
4141

4242
if (openTime > partialClose[i][H_OPENTIME]) {

templates4/17 ZigZag(50,30) + Donchian.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ window_num=1
179179
Donchian.Periods=30
180180
</inputs>
181181
</expert>
182-
levels_color=15453831
183-
levels_style=1
182+
levels_color=16316664
183+
levels_style=2
184184
level_0=200
185185

186186
period_flags=0

0 commit comments

Comments
 (0)