MT4 Files

Check-in [0bcf2125f6]
Login

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

Overview
Comment:Explicitly declare order table sequence
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1:0bcf2125f619d906a3b50eba83cc4b1b8dc31eb8
User & Date: onagano 2011-08-29 10:43:04
Context
2011-08-29
10:43
Explicitly declare order table sequence Leaf check-in: 0bcf2125f6 user: onagano tags: trunk
2011-07-30
05:32
Updated MegaDroid check-in: a9f1d5f18e user: onagano tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to experts/MOB_executeOrder.mq4.

383
384
385
386
387
388
389

390


391
392

393
394
395
396
397
398
399
  }
//+------------------------------------------------------------------+

string createOrderTableSQL(string tableName) {
   // MySQL has AUTO_INCREMENT option at column definition,
   // but PostgreSQL needs SEQUENCE object...
   string opeIndName = tableName + "_OPEIND";

   string sql = ""


      + "create table " + tableName + " ("
      + "  id integer identity"

      + ", operation integer default 0"
      + ", ticket integer default -1"
      + ", opposite_ticket integer default -1"
      + ", symbol varchar(10) default ''"
      + ", type integer default -1"
      + ", lots double precision default 0.0"
      + ", open_price double precision default 0.0"







>

>
>

<
>







383
384
385
386
387
388
389
390
391
392
393
394

395
396
397
398
399
400
401
402
  }
//+------------------------------------------------------------------+

string createOrderTableSQL(string tableName) {
   // MySQL has AUTO_INCREMENT option at column definition,
   // but PostgreSQL needs SEQUENCE object...
   string opeIndName = tableName + "_OPEIND";
   string ordSeqName = tableName + "_SEQ";
   string sql = ""
      + "drop sequence if exists " + ordSeqName + ";"
      + "create sequence " + ordSeqName + ";"
      + "create table " + tableName + " ("

      + "  id bigint default nextval('" + ordSeqName + "') primary key"
      + ", operation integer default 0"
      + ", ticket integer default -1"
      + ", opposite_ticket integer default -1"
      + ", symbol varchar(10) default ''"
      + ", type integer default -1"
      + ", lots double precision default 0.0"
      + ", open_price double precision default 0.0"