NexusFi: Find Your Edge


Home Menu

 





Limit orders or market


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Quick Summary with 1 posts (0 thanks)
    2. looks_two iantg with 1 posts (0 thanks)
    3. looks_3 wldman with 1 posts (0 thanks)
    4. looks_4 brokerbombero with 1 posts (0 thanks)
    1. trending_up 1,601 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 2 attachments




 
Search this Thread

Limit orders or market

  #1 (permalink)
 brokerbombero 
Elda Spain
 
Experience: Beginner
Platform: ninja
Broker: NinjaTrader Brokerage
Trading: SP
Posts: 1 since Oct 2016
Thanks Given: 1
Thanks Received: 0

Hello. I have developed an indicator that indicated me the bigtrades to the ASK o BID that they have made, and they paint a bubble in the chart window. It's like a time & sale improved. (agreggated)





I have a question..It's there are any way to coded when we see a trade in the Time&Sale windows (Blocks), if this trade is made to the market or with limits orders...

In other plataforms there are is an indicators the they tell you if the trade(yo can filter blocks) was made to the market or with limit orders...

Sometimes when yo are watching the chart (order flow in my case) I can detected that the order was a market or limit, because the reaction of the price. so anyone know something about how to coded this.

Thaks a lot...

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Increase in trading performance by 75%
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
How to apply profiles
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
19 thanks
GFIs1 1 DAX trade per day journal
16 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
  #3 (permalink)
 iantg 
charlotte nc
 
Experience: Advanced
Platform: My Own System
Broker: Optimus
Trading: Emini (ES, YM, NQ, ect.)
Posts: 408 since Jan 2015
Thanks Given: 90
Thanks Received: 1,148


Here are a few references that you can easily reverse engineer for your specific need:

Code First:

Protected override void OnMarketData(MarketDataEventArgs marketDataUpdate)
{
// TickReplay events only occur on the "Last" market data type
if (marketDataUpdate.MarketDataType == MarketDataType.Last)
{
if (marketDataUpdate.Price >= marketDataUpdate.Ask)
{
Print(marketDataUpdate.Volume + " contracts traded at asking price " + marketDataUpdate.Ask);
}

else if (marketDataUpdate.Price <= marketDataUpdate.Bid)
{
Print(marketDataUpdate.Volume + " Contracts Traded at bidding price " + marketDataUpdate.Bid);
}
}
}

Ninja Trader References: https://ninjatrader.com/support/helpGuides/nt8/en-us/?developing_for__tick_replay.htm

Explanation: Using this code, you can tell every trade that was made at the ask or bid, and you can also see the contracted volume at the ask and bid.
So from a technical perspective all you need to do, is just add this new event handler to your code, and you can aggregate up all the various different transactions into whatever time frame you are looking for. (Tick, Minute, Second, etc.), then feed the results of this to your bar update event, set a flag on your bar update event to clear the market data event (reset back to 0) then start aggregating up the next set of data. You could make this as macro, or granular as you like.

Overview: My interpretation of this data is that as you clear the level 1 resting limit order book you will see the cross between a market order and a limit order at the ask or bid depending on if it was a buy or sell. So to your question about was the trade a market order or limit order, it depends on which side of the transaction you are measuring. To one side it is a limit order and to the other side it is a market order.

Hope this helps. Cool Idea that you are working on. Best of luck!

Ian

Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,512 since Aug 2011
Thanks Given: 2,047
Thanks Received: 9,513

as logging in maxes out my tech savvy. I'm interested in this and how it develops. Dan

Visit my NexusFi Trade Journal Reply With Quote




Last Updated on December 24, 2017


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts