Automation
Best practices to be used during the automatic execution of orders with Pine Script V5.
Last updated
Best practices to be used during the automatic execution of orders with Pine Script V5.
Last updated
Our software allows you to execute your algorithm directly on the 3Commas server, avoiding external calls via web-hook alerts.
First automate your algorithm, copy the parameters from the user interface of your backtesting software (A) and import them into 3Commas' DCA algorithm (B).
For this example we choose a DCA model of up to 20 long orders, trading spot (no leverage). We activate the RSI indicator to define the trigger of the Base Order, the indicator will be set with the values 7 and 35, choosing 'Crossing Down' as the entry parameter. The weight of the Base Order is 10% and each single Safety Order will be 2%, with Price Deviation 5%. Single exit on take profit calculated on price and set to 3%. The bot will trade the ETH/USDT pair with 1H timeframe.
Now head over to 3Commas, create a new DCA bot and configure the dashboard by replicating the parameters used in backtesting. If the available initial capital is USDT 1,000, I will set 10% (USDT 100) as the 'Base Order' value, selecting USDT profits, limit orders, without reinvesting profits.
You then proceed to define the input trigger, selecting the RSI indicator in the 'Deal start condition' section and setting the values exactly equal to the backtesting.
We proceed with the take profit, set to 'Percent %' and calculated on the 'Base Order' price.
Finally, we set the 'Safety Orders' section, setting 20 USDT as the value of the orders, 20 as the maximum number of executable orders and 5% as the price range for each order. Multipliers that were not used in our example during backtesting are ignored and set to a value of 1.
Currently with the released version of this software you can use one of these three technical indicators as an input trigger. Follow these brief guides to better understand how to configure your chosen indicator.
If you have created your bot as a last step, go to the configuration page and activate it.