MT4 Files

Check-in [5edaeb74a6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed the problem of unexpectedly shared string buffer
Timelines: family | ancestors | descendants | both | exec_order
Files: files | file ages | folders
SHA1:5edaeb74a6f4a720e290ff95796e3c0c4a412061
User & Date: onagano 2011-04-08 09:28:34
Context
2011-04-09
08:01
Added localtime and relative SL/TP feature check-in: 0117e2684b user: onagano tags: exec_order
2011-04-08
09:28
Fixed the problem of unexpectedly shared string buffer check-in: 5edaeb74a6 user: onagano tags: exec_order
07:39
H2 Database confirmation check-in: f82e40cb08 user: onagano tags: exec_order
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to experts/MOB_executeOrder.mq4.

67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
...
413
414
415
416
417
418
419
420



421
422
423
424
425
426
427
int    selectOrderStmt  = 0;
int    updateOrderStmt  = 0;

int      ordId[1];
int      ordOperation[1];
int      ordTicket[1];
int      ordOppositeTicket[1];
string   ordSymbol = "1234567890";
int      ordSymbolSize;
int      ordType[1];
double   ordLots[1];
double   ordOpenPrice[1];
double   ordClosePrice[1];
int      ordSlippage[1];
double   ordStopLoss[1];
double   ordTakeProfit[1];
string   ordComment = "12345678901234567890123456789012345678901234567890123456789012345678901234567890";
int      ordCommentSize;
int      ordMagicNumber[1];
datetime ordExpiration[1];
color    ordArrowColor[1];
int      ordErrorNumber[1];
string   ordErrorMessage = "12345678901234567890123456789012345678901234567890123456789012345678901234567890";
int      ordErrorMessageSize;

string tradeTable          = "TRADE";
int    truncateTradeStmt   = 0;
int    insertTradeStmt     = 0;
string historyTable        = "HISTORY";
int    truncateHistoryStmt = 0;
int    insertHistoryStmt   = 0;

int      trdTicket[1];
datetime trdOpenTime[1];
int      trdType[1];
double   trdLots[1];
string   trdSymbol = "1234567890";
int      trdSymbolSize;
double   trdOpenPrice[1];
double   trdStopLoss[1];
double   trdTakeProfit[1];
datetime trdCloseTime[1];
double   trdClosePrice[1];
double   trdCommission[1];
double   trdSwap[1];
double   trdProfit[1];
datetime trdExpiration[1];
int      trdMagicNumber[1];
string   trdComment = "12345678901234567890123456789012345678901234567890123456789012345678901234567890";
int      trdCommentSize;

string accountTable     = "ACCOUNT";
int insertAccountStmt   = 0;

datetime accServerTime[1];
double   accBalance[1];
................................................................................
      case OPE_DUMP_HISTORY:
         dumpTradesInTransaction(true);
         break;
      case OPE_DUMP_ACCOUNT:
         insertAccount();
         break;
      default:
         Print("Unknown operation: ", ordOperation[0]);



      }
      
      ordOperation[0] = - ordOperation[0];
      rc = checkMOBError(mob_executeStatement(updateOrderStmt));
   }
   checkMOBError(mob_fetchedAll(selectOrderStmt));
   







|








|





|













|











|







 







|
>
>
>







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
...
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
int    selectOrderStmt  = 0;
int    updateOrderStmt  = 0;

int      ordId[1];
int      ordOperation[1];
int      ordTicket[1];
int      ordOppositeTicket[1];
string   ordSymbol = "A234567890";
int      ordSymbolSize;
int      ordType[1];
double   ordLots[1];
double   ordOpenPrice[1];
double   ordClosePrice[1];
int      ordSlippage[1];
double   ordStopLoss[1];
double   ordTakeProfit[1];
string   ordComment = "B2345678901234567890123456789012345678901234567890123456789012345678901234567890";
int      ordCommentSize;
int      ordMagicNumber[1];
datetime ordExpiration[1];
color    ordArrowColor[1];
int      ordErrorNumber[1];
string   ordErrorMessage = "C2345678901234567890123456789012345678901234567890123456789012345678901234567890";
int      ordErrorMessageSize;

string tradeTable          = "TRADE";
int    truncateTradeStmt   = 0;
int    insertTradeStmt     = 0;
string historyTable        = "HISTORY";
int    truncateHistoryStmt = 0;
int    insertHistoryStmt   = 0;

int      trdTicket[1];
datetime trdOpenTime[1];
int      trdType[1];
double   trdLots[1];
string   trdSymbol = "D234567890";
int      trdSymbolSize;
double   trdOpenPrice[1];
double   trdStopLoss[1];
double   trdTakeProfit[1];
datetime trdCloseTime[1];
double   trdClosePrice[1];
double   trdCommission[1];
double   trdSwap[1];
double   trdProfit[1];
datetime trdExpiration[1];
int      trdMagicNumber[1];
string   trdComment = "E2345678901234567890123456789012345678901234567890123456789012345678901234567890";
int      trdCommentSize;

string accountTable     = "ACCOUNT";
int insertAccountStmt   = 0;

datetime accServerTime[1];
double   accBalance[1];
................................................................................
      case OPE_DUMP_HISTORY:
         dumpTradesInTransaction(true);
         break;
      case OPE_DUMP_ACCOUNT:
         insertAccount();
         break;
      default:
         string mesg = "Unknown operation: " + ordOperation[0];
         Print(mesg);
         ordErrorNumber[0] = -1;
         mob_strcpy(ordErrorMessage, ordErrorMessageSize, mesg);
      }
      
      ordOperation[0] = - ordOperation[0];
      rc = checkMOBError(mob_executeStatement(updateOrderStmt));
   }
   checkMOBError(mob_fetchedAll(selectOrderStmt));