Trademinator Opensource client is governed by the content of the config.php file. This article will explain the most common settings.
A typical config file looks like this:
define ('MEMCACHED_SERVER', 'localhost');
define ('MEMCACHED_PORT', 11211);
define ('MEMCACHED_TICKER_TTL', 900); // TODO: Check if 15 mins is the best option
define ('MEMCACHED_ORDERS_TTL', 1); // TODO: Check if 1 sec is the best option
// This is the minimum balance allowed after each trading operation, we do not
// want to keep dust.
define ('EXCHANGE_DUST_THREADSHOLD', 0.0001);
// Maximum number of sequential operations of the same nature (buy or sell)
// This value is using to debag. Do not use a high value, it could drain your
// balance trying to debag. 3 is a good value.
define ('EXCHANGE_MAX_SELLING_OPERATIONS', 5);
define ('EXCHANGE_MAX_BUYING_OPERATIONS', 3);
// If for a reason the price rises equal or more than this threadshold, ignore the
// EXCHANGE_MAX_SELLING_OPERATIONS and sell the balance
// 1 means 100%
define ('EXCHANGE_SELLING_THREADSHOLD', 0.05);
// Minimum time between sequential operation of the same nature (buy or sell)
// This value is used to prevent a double buy or double sell
// Value specified in seconds
define ('EXCHANGE_MINIMUM_TIME_BETWEEN_OPERATIONS', 600);
// Any selling operation MUST give at least the earning specified here. This
// value does not discount the exchange fee.
// 1 means 100%
define ('EXCHANGE_MINIMUM_EARNING', 0.006);
// Any operation must value at least XXX_
define ('EXCHANGE_MINIMUM_OPERATION', 0.0001);
define ('EXCHANGE_DEBAG_THREADSHOLD', -0.02);
// When possible, this value will grab information about the last days. Older
// information will be ignored and data will be treated as band new
// This value can be overwritten with the -d parameter in the command line.
define ('EXCHANGE_DAYS_TO_REMEMBER', 15);
// Specify the decimals to use. The minimum value of this needs to be at least
// the number of decimals of the exchanges you are using. Poloniex uses 8
// decimal places
define ('EXCHANGE_ROUND_DECIMALS', 8);
// The Trademinator Server IP
define ('TRADING_SERVER_IP', 'api.trademinator.com');
// The Trademinator Server Port
define ('TRADING_SERVER_PORT', 80);
// The Trademinator Server Protocol. You can select http or https. Https will
// give you more secrecy but it is a little bit slower than http.
define ('TRADING_SERVER_PROTOCOL', 'http');
define ('PROTOCOL_VERSION', '1');
define ('CLIENT_VERSION', '1.0');
define ('CLIENT_ONLY_WATCH', 0);
define ('DEBUG', DEBUG_TRACE_FUNCTIONS | DEBUG_EXCHANGE | DEBUG_RATE | DEBUG_WALLET);
//define ('DEBUG', 0);
- The IP of the Memcached server for the client to be used. Usually, 127.0.0.1 or localhost is a good value.
- By default 11211.
- The time, expressed in seconds, of the time to live for the exchange ticker. A value of 900 (15 minutes) is a good time.
- The time, expressed in seconds, of the time to live for the orders list. A value of 1 second is a good time.
- In order to prevent dust, this is the minimum value of each buying or selling operation. In a pair XXX_YYY, this value is compared against the XXX currency. A value of 0.00010025 is a good value since it is Poloniex minimum transaction value. This value must contain the exchange fee.
- Trademinator contains an average up technique to prevent dusting. This parameter controls the maximum number of selling operations that can be done in a row. 5 is a good value.
- Trademinator contains an average down technique to prevent bags. This parameter controls the maximum number of buying operations that can be done in a row. 3 is a good value.
- If for a reason, price rises equal or more than the ratio expressed in this parameter, Trademinator will ignore the EXCHANGE_MAX_SELLING_OPERATION and it will try to send the balance. A value of 0.05 (5 %) is a good value.
- As the name says, each operation (buying or selling) must have a least the time specified in this parameter expressed in seconds. A 600 (10 minutes) is a good value.
- Any selling trading operation must have at least this ratio of earning. 0.006 ( 0.6 %) is a good value. this value must include the possible exchange fees. Be careful, if this value is very high, for example 2%, it will be very unlikely selling trading operations happen.
- Still experimental. This value will try to average down a pair if the price falls no more than the ratio expressed in this value. -0.02 ( -2 %) is a good value.
- When Trademinator needs to extract last trading actions, it will use this value to specify the number of days to look for behind. 15 days is a good value.
- Number of significative decimal places for all operations. By default, this value should be 8.
- The IP or FQDN of the Trademinator Server
- The port of the Trademinator server.
- HTTP or HTTPS.
- Protocol version. By default, 1.
- The client version.
- If this value is more than zero, Trademinator will execute all the logical operations but it will not trade. Instead, it will display a message saying that it would trade but disabled. Use this value for debugging.
- By default 0 (no debug). Possible combination of values is DEBUG_TRACE_FUNCTIONS | DEBUG_EXCHANGE | DEBUG_RATE | DEBUG_WALLET. Trademinator will then send debug messages in the Syslog or in the journal.