Specific parameters of the MoonStrike strategy:
MStrikeDepth: field for specifying the spike depth in percent (default 10%; you may set 0.1% and higher).
How it is measured:
1) 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.
2) 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.
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.

