### Run ProfitTrailer using PM2 Source: https://wiki.profittrailer.com/en/installation/linux Sets execute permissions for the ProfitTrailer JAR file and uses PM2 to start the application. It includes instructions for managing multiple bots by editing the PM2 configuration file and commands for saving the process list and setting up startup. ```shell cd /var/opt/pt chmod +x ProfitTrailer.jar # Now run the pm2 commands below to start your bot. # Note: When running a second bot # edit pm2-ProfitTrailer.json file with vi or nano or your preffered editor # and change name property inside the file to a unique name and save pm2 start pm2-ProfitTrailer.json pm2 save pm2 startup ``` -------------------------------- ### Create ProfitTrailer Startup Script (No Sudo) Source: https://wiki.profittrailer.com/en/installation/macos Creates an executable shell script named 'runpt.sh' to launch ProfitTrailer without requiring 'sudo'. This simplifies the process of starting the bot after the initial setup. ```bash echo java -Djava.net.preferIPv4Stack=true -Dsun.stdout.encoding=UTF-8 -Dio.netty.allocator.numDirectArenas=0 -Djdk.nio.maxCachedBufferSize=262144 -XX:+UseSerialGC -XX:+UseStringDeduplication -Xms64m -Xmx512m -XX:CompressedClassSpaceSize=300m -XX:MaxMetaspaceSize=128m -jar ProfitTrailer.jar > runpt.sh; chmod a+x runpt.sh ``` -------------------------------- ### Install Node.js and npm and PM2 on Linux Source: https://wiki.profittrailer.com/en/installation/linux Installs Node.js and npm from the NodeSource repository, ensuring the latest version (v20.x) is available. It then installs PM2 globally as a process manager for running applications. ```shell curl -sL https://deb.nodesource.com/setup_20.x | sudo bash - sudo apt-get install -y nodejs # check if npm is installed. If it returns a version number it is installed. npm -version # You can skip this step if npm is already installed sudo apt-get install npm # continue here once npm is installed sudo npm install pm2@latest -g ``` -------------------------------- ### Download and Install ProfitTrailer Source: https://wiki.profittrailer.com/en/installation/linux Downloads the latest ProfitTrailer zip archive from the official source and extracts it to a specified directory. It also installs the unzip utility if not already present. ```shell cd /tmp wget https://download.profittrailer.com/ProfitTrailer.zip sudo apt-get install unzip unzip ProfitTrailer.zip # Change /var/opt/pt to something else when installing a second or third bot mv ProfitTrailer-* /var/opt/pt ``` -------------------------------- ### Install Java Development Kit (JDK) on Linux Source: https://wiki.profittrailer.com/en/installation/linux Installs Temurin JDK 8 on Debian-based Linux systems using apt package manager. This process involves adding the Adoptium repository and its GPG key to ensure secure package installation. ```shell sudo apt-get install software-properties-common sudo apt update sudo apt-get install -y wget apt-transport-https gnupg sudo apt install ca-certificates curl gnupg $ sudo install -m 0755 -d /etc/apt/keyrings $ curl -fsSL https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor -o /etc/apt/keyrings/adoptium.gpg $ chmod a+r /etc/apt/keyrings/adoptium.gpg $ echo "deb [arch=\"$(dpkg --print-architecture)\" signed-by=/etc/apt/keyrings/adoptium.gpg] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list $ sudo apt update -y $ sudo apt install temurin-8-jdk ``` -------------------------------- ### Create ProfitTrailer Startup Script (With Sudo) Source: https://wiki.profittrailer.com/en/installation/macos Creates an executable shell script named 'runpt.sh' to launch ProfitTrailer that requires 'sudo'. This is used if the bot needs administrator privileges to run correctly. ```bash echo sudo java -Djava.net.preferIPv4Stack=true -Dsun.stdout.encoding=UTF-8 -Dio.netty.allocator.numDirectArenas=0 -Djdk.nio.maxCachedBufferSize=262144 -XX:+UseSerialGC -XX:+UseStringDeduplication -Xms64m -Xmx512m -XX:CompressedClassSpaceSize=300m -XX:MaxMetaspaceSize=128m -jar ProfitTrailer.jar > runpt.sh; chmod a+x runpt.sh ``` -------------------------------- ### Execute ProfitTrailer Startup Script Source: https://wiki.profittrailer.com/en/installation/macos Command to execute the ProfitTrailer startup script 'runpt.sh' after it has been created and made executable. ```bash ./runpt.sh ``` -------------------------------- ### Full EQ Sell Strategy Example Source: https://wiki.profittrailer.com/en/config/equalizestrategy An example configuration enabling the EQ sell strategy, allowing partial sells, setting the start level to 2, resetting average price and buy times, and defining sell portions and profit targets. ```properties DEFAULT_DCA_equalize_strategy_enabled = true DEFAULT_DCA_equalize_strategy_allow_partial_sell = true DEFAULT_DCA_equalize_strategy_type = PRICE DEFAULT_DCA_equalize_strategy_start_level = 2 DEFAULT_DCA_equalize_strategy_reset_average_price = true DEFAULT_DCA_equalize_strategy_reset_buy_times = true # If EQGAIN is true, EQ sells 100% of the EQAMOUNT DEFAULT_DCA_equalize_strategy_sell_formula = B DEFAULT_DCA_equalize_strategy_sell_portion = 100% DEFAULT_DCA_A_sell_strategy = GAIN DEFAULT_DCA_A_sell_value = 2 DEFAULT_DCA_B_sell_strategy = EQGAIN DEFAULT_DCA_B_sell_value = 1 # Sell our position normally with 2% profit DEFAULT_DCA_sell_strategy_formula = A ``` -------------------------------- ### Install Certbot for LetsEncrypt Certificates (Linux/Bash) Source: https://wiki.profittrailer.com/en/ssl This snippet installs Certbot, a tool for obtaining and renewing LetsEncrypt SSL certificates. It requires root privileges and updates the package list, installs necessary software properties, adds the Certbot PPA, and finally installs Certbot. ```bash sudo apt-get update sudo apt-get install software-properties-common sudo add-apt-repository universe sudo add-apt-repository ppa:certbot/certbot sudo apt-get update sudo apt-get install certbot sudo certbot certonly --standalone ``` -------------------------------- ### ProfitTrailer FIBONACCIREVERSAL DCA Buy/Sell Example Source: https://wiki.profittrailer.com/en/config/fibonaccireversal This example demonstrates the FIBONACCIREVERSAL strategy within a Dollar Cost Averaging (DCA) context. It configures the DCA buy and sell strategies and their associated values, similar to the standard buy/sell setup but applied to DCA. ```properties # Buy when price is 1% or higher above FIBONACCIREVERSAL value DEFAULT_DCA_A_buy_strategy = FIBONACCIREVERSAL DEFAULT_DCA_A_buy_value = 1 # Sell when price is -0.5% or lower than FIBONACCIREVERSAL value DEFAULT_DCA_A_sell_strategy = FIBONACCIREVERSAL DEFAULT_DCA_A_sell_value = -0.5 ``` -------------------------------- ### Run ProfitTrailer on macOS Source: https://wiki.profittrailer.com/en/installation/macos Command to execute ProfitTrailer on macOS using Java. It includes various JVM arguments for performance and memory management. Ensure Java 8 JDK is installed and ProfitTrailer is in the current directory. ```bash java -Djava.net.preferIPv4Stack=true -Dsun.stdout.encoding=UTF-8 -Dio.netty.allocator.numDirectArenas=0 -Djdk.nio.maxCachedBufferSize=262144 -XX:+UseSerialGC -XX:+UseStringDeduplication -Xms64m -Xmx512m -XX:CompressedClassSpaceSize=300m -XX:MaxMetaspaceSize=128m -jar ProfitTrailer.jar ``` -------------------------------- ### Reversal Trading Configuration Example (INI) Source: https://wiki.profittrailer.com/en/config/reversaltrading This INI configuration snippet demonstrates how to set up the reversal trading strategy parameters within ProfitTrailer. It includes triggers for starting reversal, rebuying on price drops or rises, and timeouts for the reversal process. ```INI market = USDT DEFAULT_A_buy_strategy = RSI DEFAULT_A_buy_value = 20 DEFAULT_A_sell_strategy = GAIN DEFAULT_A_sell_value = 5 # Once we buy a position buy it does not reach our sell target # Instead of doing a stop_loss we can start a reversal strategy # If the coin drop to -10 we sell the coin and start a reversal # Now we wait for the coin to drop to -30% from it's original price to buy back # It can so happen that instead of dropping further the coin starts rising again # In this case we buy back in if the coin rises to -2%. Calculated from our original position average price DEFAULT_reversal_start_trigger = -10 DEFAULT_reversal_rebuy_drop_trigger = -30 DEFAULT_reversal_rebuy_rise_trigger = -2 ``` -------------------------------- ### WAITXCANDLES Example: Basic Buy Strategy Source: https://wiki.profittrailer.com/en/config/waitxcandles This example demonstrates how to use WAITXCANDLES in a buy strategy. It waits for one candle to close positive after a previous positive candle before entering a trade. It utilizes CHANGEPERCENTAGE for initial price movement confirmation. ```config # We use a CHANGEPERCENTAGE of 1 minute candles to see if price if moving upwards # Current bar is positive and we want to wait for the next bar to also be positive # before entering a trade DEFAULT_A_buy_strategy = CHANGEPERCENTAGE DEFAULT_A_buy_value = 0.1 DEFAULT_B_buy_strategy = CHANGEPERCENTAGE DEFAULT_B_buy_value = 0.2 DEFAULT_Z_buy_strategy = WAITXCANDLES DEFAULT_Z_buy_value = 1 DEFAULT_buy_strategy_level1_formula = A DEFAULT_buy_strategy_level2_formula = B && Z ``` -------------------------------- ### Buy Strategy Formula Examples (JavaScript) Source: https://wiki.profittrailer.com/en/config/buystrategyformula Demonstrates various combinations of buy strategy formulas using logical operators like AND (&&), OR (||), and parentheses for grouping. These examples are used within the ProfitTrailer configuration to define complex buying conditions. ```javascript DEFAULT_buy_strategy_formula = (A && B) || C ``` ```javascript DEFAULT_buy_strategy_formula = A || B ``` ```javascript DEFAULT_buy_strategy_formula = A || (B && C) ``` ```javascript DEFAULT_DCA_buy_strategy_formula = (A && B) || C ``` ```javascript DEFAULT_DCA_buy_strategy_formula = A || B ``` ```javascript DEFAULT_DCA_buy_strategy_formula = A || (B && C) ``` -------------------------------- ### Run ProfitTrailer with Sudo on macOS Source: https://wiki.profittrailer.com/en/installation/macos Command to execute ProfitTrailer on macOS with administrator privileges using 'sudo'. This is necessary if the bot encounters file permission issues when saving data. You will be prompted for your admin password. ```bash sudo java -Djava.net.preferIPv4Stack=true -Dsun.stdout.encoding=UTF-8 -Dio.netty.allocator.numDirectArenas=0 -Djdk.nio.maxCachedBufferSize=262144 -XX:+UseSerialGC -XX:+UseStringDeduplication -Xms64m -Xmx512m -XX:CompressedClassSpaceSize=300m -XX:MaxMetaspaceSize=128m -jar ProfitTrailer.jar ``` -------------------------------- ### FIXEDPRICE Strategy Configuration Examples Source: https://wiki.profittrailer.com/en/config/fixedprice Provides examples of how to configure the FIXEDPRICE strategy for buying and selling cryptocurrency pairs. It specifies the strategy type, direction, and value for triggering buy and sell orders based on the asset's price. ```properties # Buy zone begins when the ask price for BTT is below 16 satoshi. BTT_A_buy_strategy = FIXEDPRICE BTT_A_buy_strategy_direction = DOWN BTT_A_buy_value = 0.00000016 # Sell zone begins when the ask price for BTT is above 32 satoshi. BTT_A_sell_strategy = FIXEDPRICE BTT_A_sell_strategy_direction = UP BTT_A_sell_value = 0.00000032 ``` ```properties # Buy zone begins when the ask price for BTT is below 16 satoshi. BTT_DCA_A_buy_strategy = FIXEDPRICE BTT_DCA_A_buy_strategy_direction = DOWN BTT_DCA_A_buy_value = 0.00000016 # Sell zone begins when the ask price for BTT is below 32 satoshi. BTT_DCA_A_sell_strategy = FIXEDPRICE BTT_DCA_A_sell_strategy_direction = DOWN BTT_DCA_A_sell_value = 0.00000032 ``` -------------------------------- ### ProfitTrailer Buy Strategy Example (DEFAULT_B) Source: https://wiki.profittrailer.com/en/config/range This example demonstrates a buy strategy configuration in ProfitTrailer. It uses the CANDLE strategy to check if the current price is lower than the highest closing price in the last 10 candles. It specifies the buy strategy and the corresponding value. ```ini # Returns true if current price is LOWER than the highest CANDLE close price in the last 10 candles DEFAULT_B_buy_strategy = CANDLE DEFAULT_B_buy_value = -1 ``` -------------------------------- ### LASTDCABUY Strategy Example (ProfitTrailer) Source: https://wiki.profittrailer.com/en/config/lastdcabuy Demonstrates the basic configuration of the LASTDCABUY strategy in ProfitTrailer, showing a scenario where the strategy evaluates to true. ```ini DEFAULT_DCA_A_buy_strategy = LASTDCABUY Price of our last DCA buy for this PAIR was 0.0352965 \ Current ask price is 0.0351170 \ So the LASTDCABUY value is true. ``` -------------------------------- ### ProfitTrailer Sell Strategy Formula Examples (Javascript) Source: https://wiki.profittrailer.com/en/config/sellstrategyformula Demonstrates various ways to combine sell strategies using logical operators AND (&&), OR (||), and parentheses for order of operations. These examples are directly usable within the ProfitTrailer configuration. ```javascript DEFAULT_sell_strategy_formula = (A && B) || C ``` ```javascript DEFAULT_sell_strategy_formula = A || B ``` ```javascript DEFAULT_sell_strategy_formula = A || B || (C && D) ``` ```javascript DEFAULT_DCA_sell_strategy_formula = (A && B) || C ``` ```javascript DEFAULT_DCA_sell_strategy_formula = A || B ``` ```javascript DEFAULT_DCA_sell_strategy_formula = A || B || (C && D) ``` -------------------------------- ### ProfitTrailer DCA Configuration Examples Source: https://wiki.profittrailer.com/en/Academy/Basic/WhatisDCA Demonstrates how to configure DCA settings in ProfitTrailer, contrasting it with standard Pairs configuration. It emphasizes the necessity of the '_ DCA _' prefix for DCA-specific commands to function correctly. ```ini In Pairs you use `DEFAULT_buy_strategy = RSI` **in DCA you should use** `DEFAUL_DCA_buy_strategy = RSI` **instead.** ``` -------------------------------- ### ProfitTrailer OBV Buy Strategy Examples (Pairs) Source: https://wiki.profittrailer.com/en/config/obv These examples demonstrate how to configure the OBV strategy for buying in ProfitTrailer for trading pairs. It shows setting the buy strategy to OBV and defining the buy_value, which determines the thresholds for entering a buy position based on the OBV indicator. The buy_value can be positive or negative, influencing whether the strategy triggers when OBV is above or below a certain limit. ```config # Buy zone begins when the calculated value is less than -0.001 DEFAULT_A_buy_strategy = OBV DEFAULT_A_buy_value = -0.001 # Buy zone begins when the calculated value is greater than 0.005 DEFAULT_A_buy_strategy = OBV DEFAULT_A_buy_value = 0.005 ``` -------------------------------- ### Configure DCA Enabled with ProfitTrailer Examples Source: https://wiki.profittrailer.com/en/config/dcaenabled Examples demonstrating how to set the DCA_ENABLED parameter in ProfitTrailer. This includes enabling DCA universally, or conditionally based on profit percentage drops or gains. The values 'true', 'false', or decimal numbers represent different activation strategies. ```config # Option 1 - Always enable DCA DEFAULT_DCA_enabled = true # Option 2 - Enable DCA if P% drops below -2.5 DEFAULT_DCA_enabled = -2.5 # Option 3 - Enable DCA if P% goes above 0.86% DEFAULT_DCA_enabled = 0.86 ``` -------------------------------- ### ProfitTrailer OBV Buy Strategy Examples (DCA) Source: https://wiki.profittrailer.com/en/config/obv This section provides examples for configuring the OBV strategy specifically for Dollar-Cost Averaging (DCA) in ProfitTrailer. Similar to the pairs example, it shows how to set the buy strategy to OBV and define the buy_value. This configuration is used to manage buy orders within a DCA strategy, allowing for automated purchasing at potentially favorable OBV levels. ```config # Buy zone begins when the calculated value is less than -0.001 DEFAULT_DCA_A_buy_strategy = OBV DEFAULT_DCA_A_buy_value = -0.001 # Buy zone begins when the calculated value is greater than 0.005 DEFAULT_DCA_A_buy_strategy = OBV DEFAULT_DCA_A_buy_value = 0.005 ``` -------------------------------- ### LASTSELL Strategy Configuration Example Source: https://wiki.profittrailer.com/en/config/lastsell This example demonstrates the basic configuration of the LASTSELL strategy. It sets the default buy strategy to LASTSELL, assuming the pair exists in the sell log. The condition for buying is met if the current ask price is lower than the last sold price for the pair. ```plaintext DEFAULT_A_buy_strategy = LASTSELL Avg Price of our last sell for this PAIR was 0.0352965 \ Current ask price is 0.0351170 \ So the LASTSELL value is true. ``` -------------------------------- ### ProfitTrailer (X)MASPREAD Buy/Sell Examples Source: https://wiki.profittrailer.com/en/config/xmaspread Configuration examples for the (X)MASPREAD strategy in ProfitTrailer, demonstrating how to set buy and sell conditions based on the spread between fast and slow moving averages. It uses positive values for the fast line being above the slow line and negative values for the fast line being below the slow line. ```text # Buy when fast line is 2% or more above our slow line DEFAULT_A_buy_strategy_label = 5MSMASPREAD DEFAULT_A_buy_strategy = SMASPREAD DEFAULT_A_buy_value = 2 # Sell when fast line drops more than 0.1% below the slow line DEFAULT_A_sell_strategy_label = 1HEMASPREAD DEFAULT_A_sell_strategy = EMASPREAD DEFAULT_A_sell_value = -0.1 ``` ```text # Buy when fast line drops more than 5% below our fast line DEFAULT_DCA_A_buy_strategy_label = MYTEMA DEFAULT_DCA_A_buy_strategy = TEMASPREAD DEFAULT_DCA_A_buy_value = -5 # Sell when fast line is 4% or more above the slow line DEFAULT_A_sell_strategy_label = MYTEMA DEFAULT_A_sell_strategy = TEMASPREAD DEFAULT_A_sell_value = 4 ``` -------------------------------- ### WAITXCANDLES Example: DCA Buy Strategy Source: https://wiki.profittrailer.com/en/config/waitxcandles This example shows the use of WAITXCANDLES within a DCA (Dollar-Cost Averaging) buy strategy. It requires waiting for two subsequent candles to show positive price movement, confirmed by CHANGEPERCENTAGE, before executing a DCA trade. ```config # We use a CHANGEPERCENTAGE of 1 minute candles to see if price if moving upwards # Current bar is positive and we want to wait 2 bars from now to also be positive # before entering a trade DEFAULT_DCA_A_buy_strategy = CHANGEPERCENTAGE DEFAULT_DCA_A_buy_value = 0.4 DEFAULT_DCA_B_buy_strategy = CHANGEPERCENTAGE DEFAULT_DCA_B_buy_value = 0.7 DEFAULT_DCA_Z_buy_strategy = WAITXCANDLES DEFAULT_DCA_Z_buy_value = 2 DEFAULT_DCA_buy_strategy_level1_formula = A DEFAULT_DCA_buy_strategy_level2_formula = B && Z ``` -------------------------------- ### LASTDCABUY Strategy with Buy Value Example (ProfitTrailer) Source: https://wiki.profittrailer.com/en/config/lastdcabuy Illustrates the use of the LASTDCABUY strategy with a 'buy_value' parameter to define a percentage-based trigger for buys, showing a scenario where the strategy evaluates to false. ```ini DEFAULT_DCA_A_buy_strategy = LASTDCABUY DEFAULT_DCA_A_buy_value = -2 Price of our last DCA buy for this PAIR was 0.0352965 \ Trigger = 0.0352965 * ((100 - 2) / 100) = 0.03459057 (-2 is our buy_value) Current ask price is 0.0351170 \ So the LASTDCABUY value is false as trigger is lower than current ask price. ``` -------------------------------- ### Dynamic Logic Configuration Source: https://wiki.profittrailer.com/en/config Illustrates how to implement dynamic logic by using indicator values in configuration settings. It shows how to set strategy values and use them in formulas to calculate other settings like initial cost. ```configuration DEFAULT_A_buy_strategy = ATRPERCENTAGE DEFAULT_B_buy_strategy = RSI # Calculate initial cost based on the ATR volatility indicator DEFAULT_initial_cost = (SA * 2) + 10 # Check if the value of strategy B times 2 is less than 70 DEFAULT_buy_strategy_formula = (SB * 2) < 70 ``` -------------------------------- ### Trailing Buy Configuration Example Source: https://wiki.profittrailer.com/en/atrailingstory Demonstrates the configuration for trailing buy, showing buy strategies (RSI, LOWBB), their values, and the trailing buy percentage. It details how the bot identifies buy opportunities based on price drops after initial buy conditions are met. ```config DEFAULT_DCA_A_buy_strategy = RSI DEFAULT_DCA_A_buy_value = 30 DEFAULT_DCA_A_buy_value_limit = 0 DEFAULT_DCA_B_buy_strategy = LOWBB DEFAULT_DCA_B_buy_value = 30 DEFAULT_DCA_B_buy_value_limit = 20 DEFAULT_DCA_trailing_buy = 0.3 (0.3%) ``` -------------------------------- ### CANDLE Strategy DCA Example Source: https://wiki.profittrailer.com/en/config/candle This example shows how to integrate the CANDLE strategy into a DCA (Dollar-Cost Averaging) setup. It defines buy and sell conditions similar to the basic strategy but within a DCA context, influencing subsequent buys after an initial purchase. ```conf # Buy if price is more than 2% above the candle open DEFAULT_DCA_A_buy_strategy_label = CANDLEOPEN DEFAULT_DCA_A_buy_strategy = CANDLE DEFAULT_DCA_A_buy_value = 2 # Sell if price is below the candle open DEFAULT_DCA_A_sell_strategy_label = CANDLEOPEN DEFAULT_DCA_A_sell_strategy = CANDLE DEFAULT_DCA_A_sell_value = -0.01 ``` -------------------------------- ### Trailing Profit Configuration Example Source: https://wiki.profittrailer.com/en/atrailingstory Illustrates the configuration settings for trailing profit, including the sell strategy, initial profit threshold, and the trailing profit percentage. It explains how the bot monitors price movements after an initial profit is met. ```config DEFAULT_A_sell_strategy = GAIN # Start trailing as soon as profit is higher than 1% DEFAULT_A_sell_value = 1 DEFAULT_trailing_profit = 0.25 ``` -------------------------------- ### Get Windows Network Configuration Source: https://wiki.profittrailer.com/en/remoteaccess This command is used on Windows to display detailed information about all network adapters and their configurations. It is particularly useful for identifying the Local Area Network (LAN) IP address of the computer hosting the ProfitTrailer bot, which is necessary for router configuration. ```batch ipconfig /all ``` -------------------------------- ### Define Start Level for Equalize Strategy Source: https://wiki.profittrailer.com/en/config/equalizestrategy This integer parameter specifies the initial DCA level from which the Equalize Strategy should be applied. For example, setting it to 5 means the strategy will only affect DCA levels beyond the first five, allowing manual management or different strategies for the initial buys. ```text # Example: Start EQ strategy from DCA level 6 (skipping first 5) # DEFAULT_DCA_equalize_strategy_start_level = 5 ``` -------------------------------- ### XMAGAIN Strategy Buy/Sell Examples (INI) Source: https://wiki.profittrailer.com/en/config/xmagain Demonstrates how to configure the XMAGAIN strategy for both buy and sell orders using INI file format. It shows setting the strategy type, the value threshold (positive for above, negative for below), and associating it with a specific moving average type. ```ini # Buy when price is 2% above our LOWEST SMA LINE DEFAULT_A_buy_strategy_label = 5MSMAGAIN DEFAULT_A_buy_strategy = SMAGAIN DEFAULT_A_buy_value = 2 # Sell when price is -0.1% below the LOWEST EMA LINE DEFAULT_A_sell_strategy_label = 1HEMAGAIN DEFAULT_A_sell_strategy = EMAGAIN DEFAULT_A_sell_value = -0.1 ``` ```ini # Buy when price is -5% below our LOWEST TEMA LINE DEFAULT_DCA_A_buy_strategy_label = MYTEMA DEFAULT_DCA_A_buy_strategy = TEMAGAIN DEFAULT_DCA_A_buy_value = -5 # Sell when price is 4% above the LOWEST TEMA LINE DEFAULT_A_sell_strategy_label = MYTEMA DEFAULT_A_sell_strategy = TEMAGAIN DEFAULT_A_sell_value = 4 ``` -------------------------------- ### ProfitTrailer Indicator Range Configuration (CANDLE and RSI) Source: https://wiki.profittrailer.com/en/config/range This snippet shows how to configure indicators with range settings in ProfitTrailer. It includes examples for both the CANDLE indicator to retrieve the highest close price over a period and the RSI indicator to get the highest RSI value over a period. It specifies candle period, source, range value, and range length for each. ```ini # Returns the highest clsoe price in the last 10 candles CANDLE_candle_period = 3600 CANDLE_source = CLOSE CANDLE_range_value = MAX CANDLE_range_length = 10 # Returns the highest RSI value in the last 5 candles RSI_candle_period = 3600 RSI_length = 14 RSI_range_value = MAX RSI_range_length = 5 ``` -------------------------------- ### Configure Keystore for SSL Certificate (Text Configuration) Source: https://wiki.profittrailer.com/en/ssl This configuration defines the paths to the SSL certificate and private key files, along with an alias. It is used by ProfitTrailer to access the generated SSL certificate and key for HTTPS connections. Ensure the paths match your domain. ```text alias=keycert source.cert=/etc/letsencrypt/live/YOURDOMAINNAME/fullchain.pem source.key=/etc/letsencrypt/live/YOURDOMAINNAME/privkey.pem ``` -------------------------------- ### ProfitTrailer Configuration Examples Source: https://wiki.profittrailer.com/en/config/buystrategylevelxreset Illustrates ProfitTrailer's configuration for buy strategies and level resets. It shows how to define buy strategy conditions and their corresponding values, including the crucial reset formula. ```config DEFAULT_A_buy_strategy = RSI DEFAULT_A_buy_value = 70 DEFAULT_B_buy_strategy = MACD DEFAULT_B_buy_value = 0.000000001 DEFAULT_X_buy_strategy = RSI DEFAULT_X_buy_value = 50 DEFAULT_X_buy_strategy_direction = DOWN ``` ```config DEFAULT_buy_strategy_level1_formula = A DEFAULT_buy_strategy_level2_formula = B DEFAULT_buy_strategy_level2_reset_formula = X ``` ```config DEFAULT_DCA_A_buy_strategy = RSI DEFAULT_DCA_A_buy_value = 70 DEFAULT_DCA_B_buy_strategy = MACD DEFAULT_DCA_B_buy_value = 0.000000001 DEFAULT_DCA_X_buy_strategy = RSI DEFAULT_DCA_X_buy_value = 50 DEFAULT_DCA_X_buy_strategy_direction = DOWN ``` ```config DEFAULT_DCA_buy_strategy_level1_formula = A DEFAULT_DCA_buy_strategy_level2_formula = B DEFAULT_DCA_buy_strategy_level2_reset_formula = X ``` -------------------------------- ### DCA Buy Strategy Example with VWAPPERCENTAGE Source: https://wiki.profittrailer.com/en/config/vwappercentage This example shows how to integrate the VWAPPERCENTAGE indicator into a DCA (Dollar-Cost Averaging) buy strategy within ProfitTrailer. It includes settings for the base buy strategy, its value, and a limit value. ```ini DEFAULT_DCA_D_buy_strategy = VWAPPERCENTAGE DEFAULT_DCA_D_buy_value = 3 DEFAULT_DCA_D_buy_value_limit = 5 ``` -------------------------------- ### SOX Stop Loss Configuration Examples (Pairs) Source: https://wiki.profittrailer.com/en/config/soxstoploss This example demonstrates how to configure SOX stop loss for pairs trading. It sets trigger prices and portions for selling holdings based on profit percentage. ```config # We have 1000 XRP. # If the XRP price drops to give us a profit of -10% or less # ProfitTrailer will attempt to sell 25% (250 XRP). We have 750 Left. # If the price continues to drop to -20% or less # ProfitTrailer will attempt to sell a further 40% of the original holding # (400 XRP will be sold) DEFAULT_SO1_stop_loss_trigger = -10 DEFAULT_SO1_stop_loss_portion = 25 DEFAULT_SO2_stop_loss_trigger = -20 DEFAULT_SO2_stop_loss_portion = 40 ``` -------------------------------- ### Enable Trading in Pairs Configuration Source: https://wiki.profittrailer.com/en/buyandselllogic This setting enables or disables the bot's ability to populate the Possible Buy Log (PBL). If set to false, the bot will not consider any pairs for buying. ```properties DEFAULT_trading_enabled = true ``` -------------------------------- ### SOX Stop Loss Configuration Examples (DCA) Source: https://wiki.profittrailer.com/en/config/soxstoploss This example shows SOX stop loss configuration specifically for Dollar Cost Averaging (DCA) strategies. It defines trigger points and selling percentages for DCA'd assets. ```config # We have 10 LTC. # If the LTC price drops to give us a profit of -2% or less ProfitTrailer # will attempt to sell 50% (5 LTC). We have 5 Left. # If the price continues to drop to -20% # ProfitTrailer will attempt to sell a further 25% of the original holding # (2.5 LTC will be sold) DEFAULT_DCA_SO1_stop_loss_trigger = -2 DEFAULT_DCA_SO1_stop_loss_portion = 50 DEFAULT_DCA_SO2_stop_loss_trigger = -20 DEFAULT_DCA_SO2_stop_loss_portion = 25 ``` -------------------------------- ### ProfitTrailer SSL Settings Configuration (UI/Properties) Source: https://wiki.profittrailer.com/en/ssl These are the settings within the ProfitTrailer GUI to configure SSL. They point to the generated keystore file and specify passwords and aliases. The 'SSL Key Store Type' should be 'PEMCFG' for the generated keystore. ```properties SSL Key Store: /etc/letsencrypt/live/YOURDOMAINNAME/keystore.properties SSL Key Store Type: PEMCFG SSL Key Store Password: SSL Key Alias: keycert SSL Key Password: dummy ``` -------------------------------- ### RSI Smoothing Configuration (EMA Example) Source: https://wiki.profittrailer.com/en/config/smooth This configuration example shows how to apply smoothing to the RSI indicator using the Exponential Moving Average (EMA) with a length of 10. It specifies the candle period, RSI length, smoothing indicator type, and its length. ```ini # Returns a smoother RSI value using the EMA 10 indicator RSI_candle_period = 3600 RSI_length = 14 RSI_smooth_indicator = EMA RSI_smooth_indicator_length = 10 ``` -------------------------------- ### Enable Shorting on Leverage Exchanges (ProfitTrailer Configuration) Source: https://wiki.profittrailer.com/en/common This configuration snippet enables the ProfitTrailer bot to engage in shorting on supported leverage exchanges like BitMEX, Binance Futures, and Bybit. Ensure the 'shorting' property is set to 'true' in the PAIRS configuration. The bot will then interpret 'buy' actions as opening short positions and 'sell' actions as closing them. All other standard properties function similarly to long-only mode. ```properties # set this property in PAIRS to enable the bot to short shorting = true All other properties work the same as with a long bot. #For the bot buy means **OPEN** a position DEFAULT_A_buy_strategy = EMACROSS DEFAULT_A_buy_value = 0.1 #For the bot sell means **CLOSE** a position DEFAULT_A_sell_strategy = GAIN DEFAULT_A_sell_value = 1.25 ``` -------------------------------- ### ProfitTrailer COMBIMACROSS Buy/Sell Strategy Examples (PAIRS) Source: https://wiki.profittrailer.com/en/config/combimacross These examples demonstrate how to configure the COMBIMACROSS strategy for buy and sell signals in the PAIRS trading mode. It specifies the buy/sell strategy type and the corresponding value, which determines the spread threshold and direction of the indicator cross. ```config # Buy strategy is true when the calculated spread is larger than -0.2% (Fast COMBIMA is LOWER than Slow COMBIMA) and the Fast COMBIMA crossed below the slow COMBIMA within the last 5 candles. DEFAULT_A_buy_strategy = COMBIMACROSS DEFAULT_A_buy_value = -0.2 # Buy strategy is true when the calculated spread is larger than 0.05% (Fast COMBIMA is ABOVE Slow COMBIMA) and the Fast COMBIMA crossed above the slow COMBIMA within the last 5 candles. DEFAULT_A_buy_strategy = COMBIMACROSS DEFAULT_A_buy_value = 0.05 # Sell strategy is true when the calculated spread is 0.6% or larger (Fast COMBIMA is HIGHER than Slow COMBIMA ) and the Fast COMBIMA crossed above the slow COMBIMA within the last 5 candles. DEFAULT_A_sell_strategy = COMBIMACROSS DEFAULT_A_sell_value = 0.6 ``` -------------------------------- ### ProfitTrailer DCA Buy Strategy Example (DEFAULT_DCA_B) Source: https://wiki.profittrailer.com/en/config/range This example illustrates a DCA buy strategy configuration. It uses the RSI indicator to determine if the highest RSI value in the last 5 candles is below 30. It sets the DCA buy strategy and the related value. ```ini # Returns true if the highest RSI in the last 5 candles is lower than 30 DEFAULT_DCA_B_buy_strategy = RSI DEFAULT_DCA_B_buy_value = 30 ``` -------------------------------- ### STOCHRSICROSS Buy Strategy Example (Positive Value) Source: https://wiki.profittrailer.com/en/config/stochrsicross This configuration example demonstrates how to set up the STOCHRSICROSS strategy for buying when the spread is greater than 2. It specifies that the K line must have crossed above the D line within the last 2 candles. This is typically used for DEFAULT buy strategies. ```config # Buy when the spread is bigger than 2. (K is above D line) # and the K line crossed above the D line within the last 2 candles. DEFAULT_A_buy_strategy = STOCHRSICROSS DEFAULT_A_buy_value = 2 ``` -------------------------------- ### Configure Indicator Source (ProfitTrailer Configuration) Source: https://wiki.profittrailer.com/en/config/source This configuration snippet demonstrates how to set the source for indicators in ProfitTrailer. It shows examples of using OPEN prices for RSI and HLC3 for EMALINE. Ensure the chosen source is compatible with the specific indicator. ```plaintext # Our RSI was built using OPEN prices instead of close prices DEFAULT_A_buy_strategy_label = CURRENTRSI DEFAULT_A_buy_strategy = RSI DEFAULT_A_buy_value = 10 # If price is below EMALINE (HLC3) DEFAULT_B_buy_strategy = EMALINE DEFAULT_B_buy_value = -1 ``` ```plaintext # OUR RSI will use the OPEN PRICES to calculate RSI value CURRENTRSI_candle_period = 300 CURRENTRSI_length = 14 CURRENTRSI_source = OPEN # OUR EMALINE will be based on HLC3 values EMALINE_candle_period = 3600 EMALINE_length = 14 EMALINE_source = HLC3 ``` -------------------------------- ### CANDLE Strategy Buy/Sell Example Source: https://wiki.profittrailer.com/en/config/candle This configuration demonstrates how to set up buy and sell strategies using the CANDLE indicator. It specifies conditions based on the candle's open price and a percentage value. The strategy relies on the CANDLE indicator's return value. ```conf # Buy if price is more than 2% above the candle open DEFAULT_A_buy_strategy_label = CANDLEOPEN DEFAULT_A_buy_strategy = CANDLE DEFAULT_A_buy_value = 2 # Sell if price is below the candle open DEFAULT_A_sell_strategy_label = CANDLEOPEN DEFAULT_A_sell_strategy = CANDLE DEFAULT_A_sell_value = -0.01 ``` -------------------------------- ### XMAGAIN Strategy Parameter Configuration (INI) Source: https://wiki.profittrailer.com/en/config/xmagain Provides examples of how to configure the specific parameters for different XMAGAIN strategy instances within the ProfitTrailer configuration file. This includes setting the candle period, fast length, and slow length for various moving average types. ```ini 5MSMAGAIN_candle_period = 300 5MSMAGAIN_fast_length = 20 5MSMAGAIN_slow_length = 40 1HEMAGAIN_candle_period = 3600 1HEMAGAIN_fast_length = 10 1HEMAGAIN_slow_length = 50 MYTEMA_candle_period = 3600 MYTEMA_fast_length = 11 MYTEMA_slow_length = 33 ``` -------------------------------- ### Example Indicator Strategies with Heikin Ashi Candles Source: https://wiki.profittrailer.com/en/config/heikinashicandles These examples demonstrate how to set up trading strategies (DEFAULT_A and DEFAULT_B) to utilize indicators that benefit from Heikin Ashi candle calculations. Both RSI and CHANGEPERCENTAGE are shown to use Heikin Ashi candles for their respective calculations when HEIKIN_ASHI_CANDLES is set to true. ```config # Both RSI and CHANGEPERCENTAGE will use heikin ashi candles for their calculations DEFAULT_A_buy_strategy = CURRENTRSI DEFAULT_A_buy_strategy = RSI DEFAULT_A_buy_value = 10 DEFAULT_A_buy_value_limit = 5 DEFAULT_B_buy_strategy = HACHANGEPERCENTAGE DEFAULT_B_buy_strategy = CHANGEPERCENTAGE DEFAULT_B_buy_value = 0.01 ``` -------------------------------- ### Configure DCA Buy Percentage (Example) Source: https://wiki.profittrailer.com/en/config/dcabuypercentage This code snippet shows an example of how to set the default DCA buy percentage. This value determines the percentage of current holdings to purchase at the next DCA level. Higher values mean larger purchases, potentially doubling down on existing holdings. ```configuration DEFAULT_DCA_buy_percentage = 100 ``` -------------------------------- ### Configure ProfitTrailer Sell Formula Source: https://wiki.profittrailer.com/en/Academy/Basic/Setupsellstrategy This snippet demonstrates how to set the `DEFAULT_sell_strategy_formula` in ProfitTrailer's configuration to control which sell strategies are triggered. It shows examples of using logical AND and OR operators to combine strategies for different trading scenarios. Ensure correct strategy letters (A, B, etc.) are used as defined in your sell strategies. ```plaintext DEFAULT_sell_strategy_formula = A DEFAULT_sell_strategy_formula = A && B DEFAULT_sell_strategy_formula = A || B ``` -------------------------------- ### STOCHRSICROSS Buy Strategy Example (Negative Value) Source: https://wiki.profittrailer.com/en/config/stochrsicross This configuration example illustrates using the STOCHRSICROSS strategy for buying with a negative value, specifically when the spread is less than -0.5. It requires the K line to have crossed below the D line within the last 2 candles. This is often used for DCA (Dollar-Cost Averaging) buy strategies. ```config # Buy when the spread is smaller than -0.5. (K is above D line) # and the K line crossed below the D line within the last 2 candles. DEFAULT_DCA_A_buy_strategy = STOCHRSICROSS DEFAULT_DCA_A_buy_value = -0.5 ``` -------------------------------- ### Trailing Rebound Configuration Example Source: https://wiki.profittrailer.com/en/atrailingstory Demonstrates the configuration settings for Trailing Rebound strategy in Profit Trailer. This strategy requires the GAIN sell strategy to be enabled and uses rebound counts to determine sell triggers. Note that `DEFAULT_trailing_profit_rebound_count` and `DEFAULT_DCA_trailing_profit_rebound_count` are key parameters. ```ini DEFAULT_A_sell_strategy = GAIN DEFAULT_A_sell_value = 1 (1.0% profit) DEFAULT_trailing_profit = 0.15 (0.15%) DEFAULT_trailing_profit_rebound_count = 2 ```