Advanced Strategy Parameters

Advanced Strategy Parameters

Quick article search

MoonStrike Strategy and Its Parameters

The purpose of this strategy is to catch a sharp price drop (“spike down”) and place an order as quickly as possible in order to buy the asset before the price bounces back. Such an impulsive price movement may occur, for example, when many traders’ stop-orders are triggered after a significant support level is broken. However, the strategy may not always trigger successfully, because it must manage to buy the dip faster than other exchange bots. Minimal ping to the exchange and the absence of lags play a crucial role.


For this reason, it is strongly recommended to run the Moonbot terminal on a dedicated server (VDS) located in Tokyo, Japan. It is also advisable to increase the priority of the Moonbot application (in recent versions, when the terminal is launched as Administrator, the “Above Normal” priority is set automatically).


MoonStrike Strategy

  • MStrikeDepth: field for specifying the spike depth in percent (default 10%; you may set 0.1% and higher).
    How it is measured:

    • LastBidEMA (over 4 ticks) is calculated using the following rule: If at the previous tick the BID is lower than LastBidEMA, then LastBidEMA is taken as the BID at the previous tick — meaning that during a price drop LastBidEMA will equal the BID in the order book 2 seconds earlier. If at the previous tick the BID is higher than LastBidEMA, then a regular EMA (over 4 ticks) is calculated. Thus, when the price is falling, LastBid will always be minimal; when the price is rising, it will grow smoothly.

    • The depth is calculated from LastBidEMA down to the minimum spike price at the moment of detection.
      Note 1: also catches the “rise and immediately drop” situation. To exclude it, one could calculate EMA from BID, but this will lead to catching slow declines, similar to the Drops strategy.
      Note 2: trades from the exchange arrive into the terminal sequentially, meaning the spike price is drawn from top to bottom not instantly. As a result, at some moment when the spike moves below MStrikeDepth, the detect will occur, while the price may still continue falling. To avoid such situations, see the parameter MStrikeBuyDelay;

  • MStrikeVolume: field for specifying the minimum spike volume at the moment of detection;

  • MStrikeAddHourlyDelta: field for specifying an additional percent added to MStrikeDepth for each percent of the hourly delta.
    Example:
    if MStrikeAddHourlyDelta = 0.05 (%), MStrikeDepth = 10 (%), and the 3-hour delta is 20%, then the spike-depth detect will not be at 10%, but at 10% + (20 × 0.05) = 11%. As the 3-hour delta changes over time, the spike-detection depth will also be recalculated automatically. If the 3-hour delta decreases — the required spike depth becomes smaller (but never below MStrikeDepth); if it increases — the required spike depth becomes larger.

  • MStrikeAdd15minDelta: field for specifying an additional percent added to MStrikeDepth for each percent of the 15-minute delta. Works analogously to the example above;

  • MStrikeAddMarketDelta: field for specifying an additional percent added to MStrikeDepth for each percent of the Market delta. Works analogously to the example above;

  • MStrikeAddBTCDelta: field for specifying an additional percent added to MStrikeDepth for each percent of the hourly BTC delta. Works analogously to the example above;

  • MStrikeBuyDelay: field for specifying a delay (in milliseconds) before placing the Buy order. At first glance this contradicts the idea of the strategy, but in situations where trades continue to draw the price even lower after the detect, this setting can help. A delay is inserted between the detect and the Buy order, and during this delay the spike measurement continues.
    ⚠️ Important! The general parameters SellPrice and BuyPrice are NOT PRESENT in this strategy. Instead, the parameters MStrikeBuyLevel and MStrikeSellLevel are used;

  • MStrikeBuyLevel: field for specifying the percentage level at which the Buy order is placed, calculated from the recorded spike depth. If set to 0, the Buy order is placed at the very bottom of the spike; if set to 50%, the Buy order is placed halfway into the spike;

  • MStrikeBuyRelative: checkbox YES/NO.
    If YES is set, the Buy order is calculated as described in MStrikeBuyLevel.
    If NO is set, the Buy order is placed at an absolute percentage offset from the price before the spike detection.
    Examples:

    • If MStrikeBuyRelative = YES and MStrikeBuyLevel = 5, the Buy order will be placed at a relative 5% above the spike bottom.

    • If MStrikeBuyRelative = NO and MStrikeBuyLevel = -5, the Buy order will be placed at an absolute –5% from the pre-spike price.

  • MStrikeSellLevel: field for specifying the percentage level for placing the Sell order, calculated from the spike depth rather than from the Buy price.
    Example:
    if the detected spike depth is 10%, and MStrikeSellLevel = 80%, then the Sell order will be placed at 80% of that spike depth, i.e., 8% above the recorded spike bottom;

  • MStrikeSellAdjust: checkbox YES/NO.
    If YES is set, the Sell price is taken as the minimum of the following three values: spike depth, calculated Buy price and actual Buy price. Recommended: enable this parameter for shallow spikes (1…3%) and disable it for deeper ones (5% and more);

  • MStrikeDirection: menu for choosing the direction of the Buy order:

    • Both — in both directions symmetrically

    • OnlyLong — long only

    • OnlyShort — short only.
      Both and OnlyShort options work only on futures.

  • MStrikeWaitDip: checkbox YES/NO.
    If YES is set, the strategy waits until a trade appears with a price higher (or for shorts — lower) than the previous one in any direction. Example for long: if the spike was caused by Sell orders, the detect occurs as soon as a Buy or Sell trade appears at a higher price. The waiting time is limited to 10 seconds. If no such trade appears, no Buy order is placed.


When MoonStrike triggers, the log records the following values:


  • LastBidEMA value;

  • minimum recorded spike price at the moment of order placement;

  • spike depth in percent;

  • spike volume;

  • Buy order price;

  • pre-calculated Sell price.


Example:


04:13:00.097 BCD: MoonStrike LastBID:0.00029700min.Price: 0.00029500 Depth:0.7%StrikeVol:0.295BTCBuyPrice:0.00029500sell+0.7%SellPrice:0.00029699.


⚠️ Important!
In the MoonStrike strategy, on the Buy conditions tab, the order size in the OrderSize parameter must be explicitly specified.
If you set OrderSize = 0, the order size will not be taken from the main Moonbot window (fixed buttons or slider), and the strategy will not produce detects.