Skip to main content

PingPong Spot Trading Strategy

Info

The PingPong strategy is designed for markets that are trading sideways or within a defined range. It operates by setting fixed buy and sell price points, executing trades as the market price "pings" off the lower (buy) price and "pongs" off the upper (sell) price.

The PingPong strategy is a fixed-price approach ideal for trading pairs that fluctuate within a predictable price range for extended periods. You define specific buy and sell prices, and Gunbot executes trades when these target prices are met or surpassed.

To refine this method, Gunbot allows the use of additional indicators (like RSI, MACD, etc.) for buy and/or sell confirmation. For example, you could configure Gunbot to buy at your specified price only if the Relative Strength Index (RSI) is also at or below 30.

Furthermore, by setting the fixed buy (PP_BUY) and sell (PP_SELL) prices to unattainable levels (e.g., extremely low for buy, extremely high for sell), you can configure this strategy to trade based solely on signals from your chosen confirming indicators, ignoring the fixed price points.

How It Works​

Buy Conditions:​

A buy order is triggered when the market price is at or below the price specified in PP_BUY (and any confirming indicator conditions are met, if configured).

tip

Normal constraints like "buy once, sell once" don't apply to this strategy: each time buying criteria occur, Gunbot will place a buy order as high as set in your balance settings.

Sell Conditions:​

A sell order is triggered when the market price is at or above the price specified in PP_SELL (and any confirming indicator conditions are met, if configured).

info

Gain protection is optional for this strategy. Be aware that this can lead to sell orders below your break-even point.

When you want to allow sell orders at loss, set a negative value for GAIN.

Trading Example​

PingPong strategy example showing alternating buy and sell order execution

Example of potential PingPong strategy performance. [_Details and settings](https://www.tradingview.com/chart/BTCUSD/u0VqADZY-Pingpong-Gunbot-trading-strategy/)_

PingPong Strategy Settings​

Buy Settings​

LabelConfig ParameterDefault ValueDetailed Description
Buy enabledBUY_ENABLEDtrueIf enabled, allows the PingPong strategy to place buy (long) orders.
Pingpong buyPP_BUY1000Defines the specific fixed price at which a buy order will be placed. The example default of 1000 is illustrative; set this to your desired buy price for the pair.

Sell Settings​

LabelConfig ParameterDefault ValueDetailed Description
Sell enabledSELL_ENABLEDtrueIf enabled, allows the PingPong strategy to place sell (short) orders.
Pingpong sellPP_SELL1000Defines the specific fixed price at which a sell order will be placed. The example default of 1000 is illustrative; set this to your desired sell price for the pair.
Count sellCOUNT_SELL9999Disables trading for the pair after a specified number of sell orders have been executed. Helps manage exposure or cap trades.

Indicators​

LabelConfig ParameterDefault ValueDetailed Description
PeriodPERIOD15Defines the candlestick period (e.g., 15 minutes) used for any confirming indicators you enable with the PingPong strategy. Ensure the chosen value (in minutes) is supported by your exchange.

Overview of Effects on Different Order Types​

Config ParameterAffected Order TypesNot Affected Order Types
Buy EnabledStrategy buy, DCA buy, RT buy, RT buybackStrategy sell, Stop limit, Close, RT sell
PP BuyStrategy buyStrategy sell, Stop limit, Close, RT sell, DCA buy, RT buy, RT buyback
Sell EnabledStrategy sell, Stop limit, RT sellStrategy buy, RT buy, RT buyback, Close, DCA buy
PP SellStrategy sellStrategy buy, Stop limit, Close, RT sell, DCA buy, RT buy, RT buyback
GainStrategy sellStrategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit