Coder Social home page Coder Social logo

csharp-nt8-orderflowkit's Introduction

About

This is a volume analysis toolkit that I started programming in February 2020, it is focused on all Futures markets and written in C#, Particularly runs on the NinjaTrader8 platform, and it is based on the Wyckoff method. Although I think there are more things that can be added I release the code to help the whole community of programmers interested in financial markets and trading, greetings!

A little of history about the proyect...

In mid of 2019 I work in my first investment fund that just started, I learned everything related to financial markets and how a trader operates, then about Dark Pools, HFT(High Frequency trading), Futures(Ninjatrader8), Forex(Metatrader5) and how Market makers work.

During that time I started to develop the first stage of the Order Flow, which I did from scratch.By that time I already understood the contract and volume mechanisms offered by Futures and all these financial instruments, so after many tests and headaches I managed to capture this information to do Type-Reading, Volume Profile, Book Mapping, etc... understanding the Wyckoff method was useful in the beginning but I was falling short, due to the frenzy of modern markets (by the increase of the underlying volatility and amount of robots), more latter i start to research as a freelancer in this area using Machine Learning, Deep Learning and Data Science.

Social media

ins Instagram: www.instagram.com/gab.zenobi/
lin LinkedIn: www.linkedin.com/in/gabriel-zenobi

Contribute to this project

if you want to contribute, you can donate to any of the following addresses(Binance).

btc Coin: BTC(Bitcoin), Network: Bitcoin
Address: 1GgmkVTy7EjnuawvC24aUCmpFz48MBJqQm

eth Coin: ETH(Ethereum), Network: BEP20 / ERC20
Address: 0x5fc50c6108102c7d754471ce0db35b4ca3c19b34
or Network: BEP2, with Address: bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23, and MEMO: 461252966

usdt Coin: USDT(TetherUS), Network: BEP20 / ERC20
Address: 0x5fc50c6108102c7d754471ce0db35b4ca3c19b34
or Network: TRC20, with Address: TLu3KdjysbVi5uabawzerpqRSS3qZxNXQm
or Network: BEP2, with Adress: bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23, and MEMO: 461252966

bnb Coin: BNB, Network: BEP20 / ERC20
Address: 0x5fc50c6108102c7d754471ce0db35b4ca3c19b34
or Network: BEP2, with Adress: bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23, and MEMO: 461252966

ada Coin: ADA(Cardano), Network: ADA Cardano
Address: DdzFFzCqrhsqz8XRBQQ8MQBNBbRjKXykmtxsL86JHfGGWfeA4DFMK5Qp8Byzj4PcrxoVxUyad3T413Fktxg1YzTh6nEfR3HXMcueDFtk
or Network: BEP20, with Address: 0x5fc50c6108102c7d754471ce0db35b4ca3c19b34
or Network: BEP2, with Address: bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23, and MEMO: 461252966

busd Coin: BUSD, Network: BEP20, ERC20
Address: 0x5fc50c6108102c7d754471ce0db35b4ca3c19b34
or Network: BEP2, with Address: bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23, and MEMO: 461252966

How install

The fist step is to copy the files on AddOns folder and then paste it in the path AddOns of Ninjatrader8.

addons

The we need to do the same for the indicators(Bookmap.cs, MarketVolume.cs, OrderFlow.cs, VolumeAnalysisProfile.cs, VolumeFilter.cs). We paste it in the Ninjatrader8 indicators folder

addons

Finally we need to activate "Tick Replay": Tools->Options->Market Data and activate "Show Tick Replay".

opts

The same for Data Series of each Chart we use: New->Chart->Instrument(for example ES) and activate "Tick Replay".

ds

Bookmap + Order book

The bookmap serves to see the depth of market (DOM or Level 2) using a heat map, which is useful to detect capital injections, aggressive and passive orders, aggressive levels of volume and also comes with an Order Book that shows the distribution of the price along with the total amount of volume in the market (both Total and Bid/Ask).

It is a very complete tool because it allows us to apply filters of orders and data to numerical and percentage level, plus a wide range of styles that lets us vary from colors to size of the letters and limits, but that's not all ... There is an option called "Realtime save session" within "Book Map Database" with which we can record in real time all the data extracted by the Bookmap and then save it in a .db file, this is very useful because we can reload the session whenever we want and not lose any progress. Another great feature is to be able to use this file (if you know how to read it) for data analysis, applying Machine Learning or any statistical method to look for patterns, in fact this is the purpose of such functionality.

If you see my examples all of it is "1 second" of time-frame, this is because with this setup we can able to see the market in a very precision way. Experts algorithms can use this for detect market manipulation and High frequency trading(HFT).

Features:

  • Ladder range: x(levels of the ladder of contracts)
  • Market orders calculation: Delta, Total. Book map database:
  • Session save file path: filename.db(the ".db" is obligatory)
  • Session load file path: filename.db(the name of the file saved previously)
  • Realtime save session: True/Falta(do you want to save?, enable this option!) Book map Filters:
  • Agressive market orders: X(detect agressive volume from X, this is show in the price)
  • Big pending orders: Y(detect orders from Y, it is useful for detect HFT)

There are many other features that have to do with the tool's style and colors

bookmap1

Demo of default config of BookMap.

bookmap2

Tunning ladder for see Bid/Ask separatly.

bookmap3

Zoom for show number of volume.

bookmap4

Another zoom for see big volume of orders(setting a pre-defined filter)

bookmap5

Order Flow

The order flow is a tool that allows us to see the flow of orders in the market, with this we can see the difference between the level of supply and demand. A good trader(or an AI algorithm in my case) can provide us information about a possible future price imbalance, and using this knowledge exploit a resistance point at which to place an order. In other words, the order flow shows us the number of contracts at each price level, which is why it is sometimes also called "Cluster Chart" or "Footprint".

This tools offers a lot of styles and formulas to deal with it:

  • Formulas: Bid/Ask, Total Delta, Total, Delta
  • Representation: Volume(raw numbers), Percent
  • Position(Profile): Left, Right
  • Style: Profile, Heatmap
  • Cluster POC, POC Lines, Cluster POI, POI Lines
  • Extra info: POC = Point of control(Maximum volume cluster), POI = Point of imbalance(Minimum volume cluster) The POI is a concept that i create, and just is the oppose to the POC...

orderflow1

Demo of default config of the Order Flow/Footprint/Cluster chart(using BidAsk formula).

orderflow2

Cluster POC + Cluster POI + POC and POI Lines(using TotalDelta formula)

orderflow3

Zooming the cluster we can see the contracts(using TotalDelta formula)

orderflow4

orderflow5

Using Heatmap style(BidAsk formula)

orderflow6

Using Heatmap style(Total formula)

orderflow7

orderflow8

Volume Profile

The volume profile shows a horizontal distribution of the number of contracts traded at each price level over a period of time. It also provides additional information such as POC, POI, Delta volume, Total Volume over a certain period of time. One of its features is that it gives us the possibility to drag and drop, so we can select price zones and make a volume profile (we can also delete them when we don't need them).

Features:

  • Formulas: Total, Delta, BidAsk, TotalAndBidAsk, TotalAndDelta, TotalAndDeltaAndBidAskm
  • Ladder information: BidAsk, TotalAndDelta, Total, Delta.
  • Time: Days, Minutes, Hours
  • POC and POI.
  • Hold CTRL and select a zone in the chart(the selected area will be marked in blue), then left click to show a new Volume Profile.
  • Hold SHIFT and select an added Volume Profile(if the selected area is correct will be marked in red), then left click to delete a Volume Profile.

volumeprofile1 volumeprofile2

Default config(BidAsk formula).

volumeprofile3

Total and BidAsk formula

volumeprofile4

Zooming the ladder of prices to see the volume.

volumeprofile5

Only Delta volume calculations

volumeprofile6

Select a zone to add a new volume profile.

volumeprofile7

Select a volume profile to delete.

volumeprofile8

Total and Delta and BidAsk volume

volumeprofile9

Volume Filter

The volume filter is an indispensable weapon when we need to detect areas of important volume, probably the market is in a battle between buyers and sellers. Sometimes we will only filter out a specific amount of volume while at other times we will need a "map" of all incoming volume (from the smallest to the most aggressive). This tool is very useful if is combined, for example with the Book Map.

Features:

  • Formula: Delta, Total.
  • Min volume filter: X(a volume less than this amount will be discarted) Geometry:
  • Drawn: Circle, Rectangle.
  • Fill: True, False.
  • Agressive level: X(this impact on the size of the volume zone).
  • Among others...

Default setup volumefilter1

Filtering volume using Delta formula.

volumefilter2

Zooming

volumefilter3

Using rectangles geometry

volumefilter4

Using Circles geometry with Total formula

volumefilter5

Market Volume

This is the simplest volume analysis tool, and one of the most used... with it we can see the total amount of Delta volume, accumulated volume among other characteristics. One of the most innovative things is that we can choose cumulative time-frames (most tools of this type only allow a fixed time) as a default period. So we can set volume time-frames.

Features:

  • Formula: BidAsk, Delta, Total, TotalBidAsk, TotalDelta.
  • Period: 1(by default, if we increase this amount we can accumulate the volume period)
  • Market calculation style: Zero Line Color

Default setup.

marketvolume1

Using Delta formula, Periods: 5

marketvolume2

Using Total formula, Periods: 5

marketvolume3

Using TotalDelta formula, Periods: 5

marketvolume4

Using TotalBidAsk formula, Periods: 5

marketvolume5

csharp-nt8-orderflowkit's People

Contributors

gbzenobi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

csharp-nt8-orderflowkit's Issues

tick grouping for poc

HI,
Feature request
tick grouping for poc and the bigtrade if possible
I am interested only in the candlesticks poc with tick groping example 4 or 5 or 10 ticks
If you show-me where must I modify the code may I can do myself
but if you have time for more advanced, you can do grouping by ticks for the same orderflow, volume analysis profile and Market Volume
thanks for share your work

Futures Session Start

Hi,

Thank you for your toolset! I noticed that the volume profile starts at midnight each day. Can you point me to the lines where I can attempt to set it to when the futures session starts?

Thanks,

Indicator doesn't show up right..

@gbzenobi Thanks for sharing this free and making it opensource.. After applying the indicator i am not able to see the order flow.. is there something which i am missing..

The orderflow in chart looks like this
image
image

Doesn't import correctly: "Programming errors"

image

Hi. This software looks excellent. I'm getting an error when I try to install it, and have not been able to get it working.

I copy/pasted the two "add ons" to the AddOns folder, and the other .cs files into the Indicators folder. It's throwing an error that there are programming issues, even if I only put [any] one of the indicators into the Indicators folder. It does NOT throw the error if only the add ons are in the AddOns folder, only getting the error when the indicators have been moved. Am I doing something wrong, or does the code simply need to be updated?

I will likely work on this myself in my spare time, and will update this ticket with an progress.

If anyone has any ideas, please share.

OrderFlow works with custom bar type called DeltaBarsType but disappears when the data series shifts.

First of all, thanks so much for putting this out there. This repo is SEXY! I have often wanted to do an orderflow-type of screen with a custom bar type, but knowing how much work it would be I have not done so. Thank you kind stranger for doing all this work. I am a dev with 10 years C# experience and 20 years overall, so I wanted to get this issue on the books, but I will be digging in to figure out what is happening here. Will update you as soon as I know. Looking forward to helping on this project as needed. This is so, so cool!

Anyone using CSharp-nt8-can use this tool with this ML Startegy?

Hey everyone, I've been trying out a new strategy over the last month, specifically on NinjaTrader 8, and it's been a game-changer. This tool is specially made for NT8, and it’s super straightforward to use. It comes with a strategy that takes any indicator as a feature, and optmizes its trades for the strategy params. If you’re looking to make more informed, effective trading with realtime learning, and ongoing training of the models.
I would say its the latest tech for ML and trading - basically its ML pipeline on orderflow...I have been looking for such products for long time, if anyone knows other products like this let me know!

Their strategy is based on this order flow article - http://tesi.luiss.it/27169/1/701851_PECCHIARI_MATTEO.pdf

Learn more here...

Thank you

This is an impressive volume of work. Thanks for sharing it. It's light years ahead of what I was coming up with on my own. So much of the good NinjaTrader code is obfuscated, it's really educational to see such a thorough framework.

does not match

NT8 does not import this project , warning is: this project is match old version nt???

Feature Request: Imbalance Detection

I came across your work a few days ago and I would like start by thanking you for your contribution to the open source community of traders. Building up on your initial work here, I am interested in exploring the possibility to implement what is showing in the chart screenshot below.

Screen Shot 2022-06-27 at 9 12 50 PM

Features shown on this chart are:

  • Volume Imbalance Cluster Detection
  • Unfinished Auction Detection
  • Volume Imbalance Detection
  • Bid Volume per Price
  • Bid Volume per Bar
  • Ask Volume per Price
  • Ask Volume per Bar
  • Most Traded Price at Each Bar
  • Delta per Bar
  • Accumulated Delta per Bar
  • Bid X Ask, Ask X Bid, Total Volume or Delta Value in Each Cell

Accessing Delta chng variable on each bar?

I found your Order Flow indicator today on GitHub. Amazing work!

I was trying to figure out if the Delta chng is a variable that can be accessed in your indicator. See screenshot attached. I want to access it to use it in a ninjascript strategy I coded.
chart snip

Help! The Order Flow Kit does not show up in NT8 Indicator

Hi All,

I have copied add-ons and indicators to the NT8 folders according to instruction, follow by choose tick replay on the option. After open the 1 minute new chart of ES, the WyckoffRender folder does not show up in Indicator. May I know whether there is any solution? Or I have miss out anything? My NT8 version is 8.1.1.7 64-bit

Thank you.

Request & Thank You!

Hello!
Thank you for your work.
Looks great, I'm trying to figure out how it all works now.
I have a few questions:

  1. What is Aggressive level in Volume Filter? I did not find in the code the place where it is calculated.
    Does the Volume Filter indicator filter Volume per trade?
  2. For Bookmap + Order book do I need to have a Level 2 subscription?
  3. How to call Indicators in a Strategy?
    For example, how to get data from Volume Filter and POC from Volume Profile?
  4. How can I change (increase) the size of the Circle or Rectangle in the VolumeFilter? When I do zoom out, Circle or Rectangle are very poorly visible and are lost on the Chart. I use it on 1 min Chart.

Regards,

Order Flow Chart on Range 30 or lower

These indicators are really great, thanks for creating them.

I have a problem when I add the Order Flow indicator to a Range chart, mainly of 30 or lower.

The previous orders disappear from the chart after a number of seconds, I think it's to do with a new bar being created.

indicator

Do i need a 3rd party key to use the indicators, i installed the files but are not showing up in the program

Problem whit CSharp-NT8-OrderFlowKit

hello, and Have a good year 2023 !
I just installed "CSharp-NT8-OrderFlowKit" on my NT8 and when I want to put one of the indicators on a chart, no indicator appears in the list of indicators already present on NT8! I don't understand, I followed the 2 steps correctly: copy the 2 files in ADDONS and copy the 5 files in INDICATORS, then check the replay boxes.
could you help me ?
thanks in advance
Eric

Request & Thank You!

Muchisimas gracias por este trabajo! I wanted to thank you, this is amazing.

I would like to a make two requests or suggestions..

Volume Analysis Profile, this could use Value Area High and Value Area Low lines. Your calculation and painting is perfect, but traditionally it would be ideal to see the lines or have the zone colored.

Order Flow, if we could edit the divider on the bidxask. Instead of just '123x321' it would be great if we could use spaces AND the option to remove the 'x' entirely. It looks cleaner as '123 x 321' but if you use candles inside it looks best without the 'x' and instead just spaces like '123 321'.

Sin pena y sin compromiso! Thank you once again!

POI - POC Lines

Hi gbzenobi !

Thank you very much for your open-source kit !

Can you help me to access the POI & POC Lines - values (a series for public proberties) in realtime, to use that info for a NT8 strategy ?

great job & THX !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.