EURCHF: null null GBPAUD: null null AUDJPY: null null NZDUSD: null null USDCHF: null null USDJPY: null null NZDJPY: null null EURGBP: null null EURCAD: null null EURAUD: null null GBPJPY: null null GBPUSD: null null EURUSD: null null AUDUSD: null null CADJPY: null null

PostgreSQL report server

PostgreSQL report server

Report server similar to original utility, but this one exports data to PostgreSQL.
This database has several advantages over MySQL to which data is replicated by Metaquotes report server.
PostgreSQL vs MySQL

Besides using PostgreSQL report server exports to database additional data such as: set of trading instruments with all settings, set of account groups with all settings including available trading instruments.

CREATE TABLE IF NOT EXISTS MT4_SYMBOLS(
  "SYMBOL" char(12) NOT NULL PRIMARY KEY, 
  "description"          char(64),
  "source"               char(12),
  "currency"             char(8),
  "gtype"                integer,
  "trade"                integer,
  "background_color"     BIGINT,
  "count"                integer,
  "count_original"       integer,
  "realtime"             integer,
  "starting"              TIMESTAMP,
  "expiration"            TIMESTAMP,
  "profit_mode"           integer,
  "filter"                integer,
  "filter_counter"        integer,
  "filter_limit"          NUMERIC,
  "filter_reserved"       NUMERIC,
  "logging"               integer,
  "spread"                integer,
  "spread_balance"        integer,
  "exemode"               integer,
  "swap_enable"            integer, 
  "swap_type"             integer,
  "swap_long"              NUMERIC,
  "swap_short"             NUMERIC,
  "swap_rollover3days"    integer,
  "contract_size"         NUMERIC,
  "tick_value"            NUMERIC,
  "tick_size"             NUMERIC,
  "stops_level"           integer,
  "gtc_pendings"          integer,
  "margin_mode"           integer,
  "margin_initial"         NUMERIC,
  "margin_maintenance"     NUMERIC,
  "margin_hedged"          NUMERIC,
  "margin_divider"         NUMERIC,
  "point"                 NUMERIC,
  "multiply"              NUMERIC,
  "bid_tickvalue"         NUMERIC,
  "ask_tickvalue"         NUMERIC,
  "long_only"             integer,
  "instant_max_volume"    integer,
  "margin_currency"       char(12), 
  "freeze_level"          integer)

  CREATE TABLE IF NOT EXISTS MT4_PRICES(
    "SYMBOL" char(12) NOT NULL PRIMARY KEY, 
    "DIGITS" INTEGER,                       
    "STYPE"  INTEGER,                       
    "POINT"  INTEGER,                       
    "SPREAD" INTEGER,                       
    "SPREAD_BALANCE"  INTEGER,              
    "DIRECTION" INTEGER,                    
    "UPDATEFLAG"  INTEGER,                  
    "TIME" TIMESTAMP,                       
    "BID" NUMERIC,                          
    "ASK" NUMERIC,                          
    "HIGH" NUMERIC,                         
    "LOW" NUMERIC) 

CREATE TABLE IF NOT EXISTS MT4_TRADES (
    "TICKET" INTEGER NOT NULL PRIMARY KEY,
    "LOGIN" INTEGER NOT NULL,
    "SYMBOL" VARCHAR NOT NULL,
    "DIGITS" INTEGER,
    "CMD" INTEGER,
    "VOLUME" INTEGER,
    "OPEN_TIME" TIMESTAMP,
    "OPEN_PRICE" NUMERIC,
    "SL" NUMERIC,
    "TP" NUMERIC,
    "CLOSE_TIME" TIMESTAMP,
    "EXPIRATION" TIMESTAMP,
    "CONV_RATES1"   NUMERIC,
    "CONV_RATES2"   NUMERIC,
    "COMMISSION"   NUMERIC,
    "COMMISSION_AGENT"  NUMERIC,
    "STORAGE" NUMERIC,
    "CLOSE_PRICE" NUMERIC,
    "PROFIT" NUMERIC,
    "MAGIC" INTEGER,
    "COMMENT" CHAR(32),
    "INTERNAL_ID" INTEGER,
    "ACTIVATION" INTEGER,
    "MARGIN_RATE" NUMERIC)

CREATE TABLE IF NOT EXISTS MT4_USERS (
  "LOGIN" integer NOT NULL PRIMARY KEY,
  "GROUP" char(16) NOT NULL,
  "ENABLE" BOOLEAN,
  "PASSWORD_PHONE" char(32) ,
  "NAME" char(128) NOT NULL,
  "COUNTRY" char(32) ,
  "CITY" char(32) ,
  "STATE" char(32) ,
  "ZIPCODE" char(16) ,
  "ADDRESS" char(128) ,
  "PHONE" char(32) ,
  "EMAIL" char(48) ,
  "COMMENT" char(64),
  "ID" char(32),
  "STATUS" char(16), 
  "REGDATE" timestamp NOT NULL,
  "LASTDATE" timestamp NOT NULL,
  "LEVERAGE" integer NOT NULL,
  "AGENT_ACCOUNT" integer NOT NULL,
  "TIMESTAMP" timestamp NOT NULL,
  "BALANCE" NUMERIC NOT NULL,
  "PREVMONTHBALANCE" NUMERIC NOT NULL,
  "PREVBALANCE" NUMERIC NOT NULL,
  "CREDIT" NUMERIC NOT NULL,
  "INTERESTRATE" NUMERIC NOT NULL,
  "TAXES" NUMERIC NOT NULL,
  "SEND_REPORTS" BOOLEAN NOT NULL,
  "USER_COLOR" BIGINT NOT NULL,
  "EQUITY" NUMERIC NOT NULL DEFAULT 0,
  "MARGIN" NUMERIC NOT NULL DEFAULT 0,
  "MARGIN_LEVEL" NUMERIC NOT NULL DEFAULT 0,
  "MARGIN_FREE" NUMERIC NOT NULL DEFAULT 0,
  "MODIFY_TIME" timestamp NOT NULL,
  "MQID" integer NOT NULL DEFAULT 0,
  "CURRENCY" char(16) NOT NULL)
  • 0
  • 279

Add comment

    • bowtiesmilelaughingblushsmileyrelaxedsmirk
      heart_eyeskissing_heartkissing_closed_eyesflushedrelievedsatisfiedgrin
      winkstuck_out_tongue_winking_eyestuck_out_tongue_closed_eyesgrinningkissingstuck_out_tonguesleeping
      worriedfrowninganguishedopen_mouthgrimacingconfusedhushed
      expressionlessunamusedsweat_smilesweatdisappointed_relievedwearypensive
      disappointedconfoundedfearfulcold_sweatperseverecrysob
      joyastonishedscreamtired_faceangryragetriumph
      sleepyyummasksunglassesdizzy_faceimpsmiling_imp
      neutral_faceno_mouthinnocent
reload, if the code cannot be seen