TradeFab’s Bollinger-Market-Maker Strategy is an automated strategy developed for NinjaTrader 8.
It creates a single BUY and SELL limit order at the same time. It tries to buy for a low price and sell at at higher price; the limit price is defined by the upper/lower band of a configurable Bollinger Band. The strategy allows to define optional “rebuy” positions, which help to recover if the trend goes in the wrong direction. A configurable stop-loss can finally close a position.
The strategy works best in slightly volatile non-trending, sideways markets.
You can use the strategy for 14 days without limitation. Only after the 14 days your account will be credited and the license will be validated. The subscription can be terminated and changed via your own login.
For license validation you need to provide a single Machine ID (see strategy FAQs for how to retrieve it) for every license you are purchasing. On checkout, please provide one Machine ID for every license you are purchasing in the “Order notes” input field. After the checkout you will receive an email with a download link.
Full feature overview
- Works in all markets, specifically tested in Forex and Cryptocurrency markets
- Works for all timeframes, specifically tested in shorter minute timeframes, like 1/5/10/15 mins
- Persistently store parameters in a local file; select configurations from a file; parameters of a running strategy can be modified by editing the file – the file is read frequently by the strategy
- Use of Limit-Orders, which helps to pay only Maker-Fees instead of Taker-Fees (typical in Crypto markets)
- Working hours per day of week
- Stop-loss, plus optional visualization of stop-loss level
- Capital-Risk level – percentage of the account which shall be used for trading
- Margin-Level – margin/leverage which is used for quantity calculation (e.g. Forex)
- Up to 3 rebuy levels can be configured, which allow to recover the current position
- Historical Spread for backtesting – useful if backtesting Forex, where NT backtester does not consider spread
- Visualization of all positions, position average-price, stop-loss level and position quantity
- Status box/Dashboard rendered in chart, which shows the following information
Complete parameter list
- Parameter File – the currently used configuration file. The file is stored in the NT8 documents/parameters folder. The file uses JSON file format and can be modified via a simple text editor. The file is even periodically loaded at runtime of the strategy to adapt parameter changes in the file.
- Verbose Level – allows to set the verbosity of the strategy script towards the NT8 Output window.
- Bollinger Period – the period for configuring the Bollinger Band.
- Bollinger StdDev – the standard deviation for configuring the Bollinger Band.
- Quantity Calculation – allows to define how the quantity for the buy/sell position is calculated. “Default” is using a fixed quantity set via the “Default quantity” in the strategy properties dialog. The settings “BasedOnBaseCurrency” or “BasedOnQuoteCurrency” are specifically useful for Forex markets. In the forex market, currency unit prices are quoted as currency pairs. The base currency also called the transaction currency – is the first currency appearing in a currency pair quotation, followed by the second part of the quotation, called the quote currency or the counter currency. For accounting purposes, a firm may use the base currency as the domestic currency or accounting currency to represent all profits and losses. For crypto currencies a static quantity should be selected, as any pair typically does not include the account currency, e.g USD. For EURUSD the quantity based on quote currency should be selected, because the current price/quote has to be used to calculate risk quantity or remaining margin. For USDJPY the quantity based on base currency should be selected, because the base/transaction currency is USD, which is the account currency, so a fixed quote of $1 will be used.
- Capital Risk Factor [%] – defines the percentage value of the capital which shall be used for the strategy. The percentage is applied to the Account-Balance retrieved from NT8. Valid range is 0…100%, the default value is 100%.
- Margin Level [%] – Broker percentage margin or leverage required for buying one contract. Only being used if “Quantity Calculation” is set to “BasedOnBaseCurrency” or “BasedOnQuoteCurrency”. Other notation is 1:50 == 2%. Examples for Forex.com: EURUSD=2%, USDJPY=4%. Valid range is 0…100%, the default value is 2%.
- Rebuy Position Size Factor – defines the quantity multiplication factor for rebuys. Default factor 1 does not increase/decrease rebuy quantity, means every rebuy has same quantity. A factor of 2 doubles quantity with every rebuy.
- 1st Rebuy Price Gap [%] – defines the minimum percentage price gap btw initial buy/sell and 1st rebuy. Set to 0 if not used. That’s a minimum gap – in realtime the gap might be larger, because new orders are only submitted, if current price is moving within the Bollinger Band boundaries; if the price is outside, no new order is submitted until price moves back.
- 2nd Rebuy Price Gap [%] – defines the minimum percentage price gap btw 1st and 2nd rebuy. Set to 0 if not used.
- 3rd Rebuy Price Gap [%] – defines the minimum percentage price gap btw 2nd and 3rd rebuy. Set to 0 if not used.
- Stop-Loss [%] – overall stop-loss when all open positions are being closed. It’s a percentage value; if set to 0 the stop-loss is not being used. Via the “Show Stop-Loss” parameter the stop-loss level can be graphically visualized in the chart window.
- Historical Spread [t] – Historical spread in ticks. Not being used if set to 0. It turned out if trading Forex, the spread of 1..2pips is not taken into consideration for backtesting/optimization in NinjaTrader; basically if backtesting, trading is initiated if current price touches limit price; in reality it the limit price plus the current spread is being used.
- Allow Historical Positions – allow positions with historic data. Should be enabled for backtesting, but disabled for realtime trading. This strategy does never have a flat position. If switching to realtime it starts with a virtual quantity which does not exist. Therefore it’s better for real-life trading to start with a clean slate and enable this switch, otherwise strategy and account quantity differ.
- Allow Trade Lockouts – allow to lockout a certain trading direction if previous trade eded in a stop-loss. This prevents in a strong trend that another position will be opened, which most probably ends up again in a loss.
- Sell At Breakeven – typically the strategy buys/sells at the upper/lower Bollinger Band. If already in a rebuy position this switch enables to sell off the position at breakeven price, instead of waiting for the next Bollinger Band crossing.
- Resubmit On Price Change – resubmit new order if limit price has changed, instead of changing it. Some exchanges/APIs, for instance Binance, don’t fully support change. Therefore a price change has to be submitted by canceling previous order and submitting a new one.
- Resubmit On Quantity Change – resubmit new order if quantity has changed, instead of changing it. Some exchanges/APIs, for instance Binance, don’t fully support change. Therefore a quantity change has to be submitted by canceling previous order and submitting a new one.
- Show Stop-Loss – if enabled, it shows the stop-loss level in the chart window. It’s rendered as a red-dotted line.
- Show Quantity – if enabled, It shows the current position quantity in a separate panel.
- Summary – shows a summary of some internal parameters which were calculated based on other parameters. It’s not editable.
- Use Trading Times – enable trading times. If not enabled, the strategy enters new positions 24/7. If enabled, it does not enter new positions outside of the trading times, and tries to sell off an open position asap.
Non-trading times are shown in the chart with a grayed-out background.
- Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday – trading times for each day.
The Status Box rendered in the lower left corner of the chart window serves like a dashboard in your car; it shows important strategy and position parameters as follows:
- File – the currently used configuration file
- Account – the account and budget based on configured risk factor
- Position count and size, average price and profit (in %, ticks and points)
- Sell, Buy, Stop-Loss position parameters, like status, price, quantity and ID
The color of the status box is hinting if the current position is in profit or loss state – the box is rendered in red for loss, green for profit, and blue for neutral position.