WaleeTheRobot / order-flow-bot

OrderFlowBot using NinjaTrader's volumetric data for semi-automated and fully automated trading. Includes several strategies and indicators. Additional strategies and indicators can be added.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OrderFlowBot

OrderFlowBot

A bot used for trading order flow with a selected ATM strategy. The recommended way to use OrderFlowBot is semi-automated trading to ASSIST with entries, but fully automated is an option.

OrderFlowBot uses the selected ATM strategy. Just create your ATM strategies and select the one you want to use for the trade. You can create your own strategies and easily hook it to OrderFlowBot for semi-automated or fully automated trading. Indicators can also be created with data from the OrderFlowBot DataBar for usage when the OrderFlowBot is enabled.

Important

Requires the lifetime NinjaTrader license for the volumetric data or the Order Flow + subscription.

Make sure Tick Replay is Checked.

Make sure you have ATM strategies.

OrderFlowBot may not work if using a version of NinjaTrader below 8.1.2.1. This is the minimum version supporting features up to C# 8. The below are information about OrderFlowBot usage.

Consider increasing the ticks per level in the data series for less liquid assets.

For developing, you can copy the OrderFlowBot folder into your local NinjaTrader AddOns folder.

For usage, you can download the zip containing the word import in the release page. You can import this zip file similar to importing a normal NinjaTrader Add-On. https://github.com/WaleeTheRobot/order-flow-bot/releases

Issues

Sometimes NinjaTrader will complain about an import failed. You can just open the zip file from the release and copy the OrderFlowBot folder into the Add On folder on your computer after removing the previous OrderFlowBot folder. It's normally located at: C:\Users\<username>\Documents\NinjaTrader 8\bin\Custom\AddOns. Afterwards, open NinjaTrader and click New > NinjaScript Editor. Click the NinjaScript Editor and press F5. It'll take a few seconds and you'll hear a sound. The icon at the bottom left corner of it will disappear when it's done compiling. Close the NinjaScript Editor and you should be good to go.

Control Panel

OrderFlowBot Control Panel

Trade Management

This section has options to manage OrderFlowBot, quickly clear other sections and close trades.

Enabled/Disabled

Resets all sections and disables or enable the sections. No strategies will be checked when disabled is selected. This can only be activated when there aren't any positions opened.

Auto

Automatically trades the selected strategies for both long and short. Disables the Trade Direction. This is NOT recommended, but is an option. Only custom created advanced strategies should be considered if this option is used. None of the default strategies available for OrderFlowBot are designed for fully automated trading.

Reset Direction

Resets the Trade Direction section.

Reset Strategies

Resets the Strategies section.

Close

Closes any ATM positions created by OrderFlowBot and resets the Trade Direction section.

Trade Direction

This section contains the inputs for triggering a trade direction.

Trigger Strike Price

The strike price to trigger the strategy to start looking for an entry. A threshold in the strategies properties section is set to allow for a buffer for triggering. The trigger strike price will only be considered if there is a value set in the input.

Long

Select this to look for long trades.

Short

Select this to look for short trades.

Indicators

Ratios

OrderFlowBot Ratios

This indicator shows the bottom divided bid ratios or top divided ask ratios. The ratios will be displayed in color, bold and larger font if it meets the threshold in ValidExhaustionRatio or ValidAbsorptionRatio properies.

Strategies

This section contains the custom created strategies and are dynamically created from the StrategiesConfig. The strategies available are intended to be semi-automated, meaning you select the strategy you want OrderFlowBot to start looking at based on your analysis and OrderFlowBot will assist with finding entries based on the strategy. The default strategies here can be used as examples to create your own custom strategy. More strategies will be considered in the future. Note that a strategy will trigger when the requirements are met, but the requirement may become invalid before the bar completes.

Delta Chaser

OrderFlowBot Delta Chaser

This strategy is designed for trading pullbacks on a trend or larger price ranges. Trade the structure with appropriate targets on higher volatility times.

Long

  • Bullish bar
  • Open above trigger strike price and within DeltaChaserValidEntryTicks if trigger strike price is used
  • Max delta >= DeltaChaserMinMaxDifferenceMultiplier * Min delta
  • Delta > DeltaChaserDelta

Short

  • Bearish bar
  • Open below trigger strike price and wihtin DeltaChaserValidEntryTicks if trigger strike price is used
  • Min delta >= DeltaChaserMinMaxDifferenceMultiplier * Max delta
  • Delta < -DeltaChaserDelta

Range Rebound

OrderFlowBot Range Rebound

This strategy is designed for trading smaller price ranges aiming to capitalize on reversion with quicker entries based on deltas. Trade the edges with smaller targets on lower volatility times.

Long

  • Bullish bar
  • Open above trigger strike price and within RangeReboundValidEntryTicks if trigger strike price is used
  • Min delta > -RangeReboundMinMaxDelta
  • Max delta > RangeReboundMinMaxDelta

Short

  • Bearish bar
  • Open below trigger strike price and within RangeReboundValidEntryTicks if trigger strike price is used
  • Min delta < -RangeReboundMinMaxDelta
  • Max delta < RangeReboundMinMaxDelta

Stacked Imbalances

OrderFlowBot Stacked Imbalances

This strategy is the common stacked imbalances strategy.

Long

  • Bullish bar
  • Open above trigger strike price if trigger strike price is used
  • Has valid ask stacked imbalances

Short

  • Bearish bar
  • Open below trigger strike price if trigger strike price is used
  • Has valid bid stacked imbalances

Volume Sequencing

OrderFlowBot Volume Sequencing

This strategy is triggered based on the sequential increasing volume starting from the top or bottom.

Long

  • Bullish bar
  • Open above trigger strike price if trigger strike price is used
  • Has sequential increasing volume on ask starting from the bottom of bar

Short

  • Bearish bar
  • Open below trigger strike price if trigger strike price is used
  • Has sequential increasing volume on bid starting from the top of bar

Backtesting

You can backtest your strategies by enabling the backtesting. This will use the backtest file name, target and stop where you enabled the backtesting.

Adding Strategies and Indicators

The custom DataBar should be used if you are considering adding strategies and indicators. It takes some of the data from the volumetric bars and creates custom bars that you can also add any additional information to. The default strategies and indicators can be used as a reference.

About

OrderFlowBot using NinjaTrader's volumetric data for semi-automated and fully automated trading. Includes several strategies and indicators. Additional strategies and indicators can be added.

License:MIT License


Languages

Language:C# 100.0%