DocOTCmd2 - OpenTrading/OpenTrader GitHub Wiki

usage: OTCmd2.py [-h] [-v IVERBOSE] [-t] [-s LSET LSET] [-c SCONFIGFILE] [-P SMT4DIR] [-T SONLINETARGET] [-R IRETVALTIMEOUT] [lArgs [lArgs ...]]

This script can be run from the command line to send commands to a OTMql4Pika enabled Metatrader. It will start a command loop to listen, send commands, based on the cmd2 REPL, or take commands from the standard input, or take commands ascommand-line arguments.

Type help at the command prompt to get more help, or call the script with --help to see the script options.

The subcommands are:

  • subscribe - Subscribe to messages from RabbitMQ on a given topic (sub)
  • publish - Publish a message to a given chart on a OTMql4Py enabled terminal (pub)
  • chart - Set and query the chart in Metatrdaer that the messages are sent to
  • order - Manage orders in an OTMql4AQMp enabled Metatrader (ord)
  • csv - Download, resample and convert CSV files into pandas
  • backtest - Backtest recipes with chefs, and serve the results as metrics or plots (back)
  • rabbit - Introspect some useful information from the RabbitMQ server

Useful cmd2 subcommands are:

  • history - show the command history; rereun commands with: run.
  • load FILE - load a script of commands from FILE.
  • save * FILE - save a script of commands to FILE; use * for all commands, a number for that command, or nothing for the last command.
  • edit - edit the previous command in an editor, or edit *, or edit FILE; commands are run after editor is closed; used EDITOR environment var.
  • py [CMD] - execute a Python command CMD, or with no arguments, enter a Python loop: In the loop: self = CMD2 object, self.oOm = Omellete, self.oOm.oBt = Oven
  • help [SUB] - help, or help on subcommand SUB.
Positional arguments:
  lArgs                 command line arguments (optional)

optional arguments:
  -h, --help            show this help message and exit
  -v IVERBOSE, --verbose IVERBOSE
                        the verbosity, 0 for silent 4 max (default 4)
  -t, --test            Run unit test suite
  -s LSET LSET, --set LSET LSET
                        Set cmd2 settables, followed by name and value -
                        repeat if needed
  -c SCONFIGFILE, --config SCONFIGFILE
                        Config file for OTCmd2 options
  -P SMT4DIR, --mt4dir SMT4DIR
                        directory for the installed Metatrader
  -T SONLINETARGET, --target SONLINETARGET
                        ini section name with the routing and target
  -R IRETVALTIMEOUT, --timeout IRETVALTIMEOUT
                        Timeout for waiting for a retval from publishing to
                        Mt4

This file is automatically generated from the source code: do not edit.


Parent: Components This file is automatically generated from the source code: do not edit.


Next: DocOTCmd2_subscribe Parent: DocOTCmd2

⚠️ **GitHub.com Fallback** ⚠️