If you would like to send custom volume with each TradingView alert, then you can enable this function in the bot settings. Upon enabling this function your TradingView alert details will change accordingly.

To set up the custom volume through TradingView alert you need only 3 steps.

  1. Insert the quantity parameter in the strategy.entry() function. In the example below, we set quantity equal to 50. If you are trading on the futures market then this quantity will be 50$

    strategy.entry("long", true, qty=50 when = entry_long, comment="Insert Enter Long Comment")
    strategy.close("long", when=exit_long, comment="Insert Exit Long comment" )

  2. Apply the code to the chart

  3. Create the alert and input the following code in the alert message box

    "qty": {{strategy.order.contracts}}

    Example of the Alert Message box:

Did this answer your question?