NexusFi: Find Your Edge


Home Menu

 





How can I count EVERY contract sold with the same timestamp in millisec in Multichart


Discussion in MultiCharts

Updated
    1. trending_up 1,313 views
    2. thumb_up 4 thanks given
    3. group 3 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

How can I count EVERY contract sold with the same timestamp in millisec in Multichart

  #1 (permalink)
Dvdkite
Trieste Italy
 
Posts: 162 since Feb 2018
Thanks Given: 131
Thanks Received: 25

Hello everyone,

I'm trying to undestand what kind of values it is possible to obtain with Multichart and easylanguage regarding every processed trade. I spent some hours researching online about just some guidelines or samples that can help me to find out details about this matter with no luck.

For example, I would like to count every single contract sold with the same timestamps with a milliseconds precision. I have a really good datafeed ( or I hope it is good: DTN IQFEED ) and I would like to process those data in order to make a custom indicator so if anyone can point me in the right direction in order to achive this it would be really appreciated.

Thanks in advance,

David

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Better Renko Gaps
The Elite Circle
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
Cheap historycal L1 data for stocks
Stocks and ETFs
 
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

David,

from your outline it's not clear if you want to store the data and if so how. If you are actually looking to store every tick (versus just counting it) you will likely have to handle a lot of data, which would most likely rule out the usage of arrays within MC, but would force you to use something outside of MC.
Can you provide an example of what you are trying to do exactly, as this might help in pointing you in the right direction?

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #3 (permalink)
Dvdkite
Trieste Italy
 
Posts: 162 since Feb 2018
Thanks Given: 131
Thanks Received: 25



ABCTG View Post
David,

from your outline it's not clear if you want to store the data and if so how. If you are actually looking to store every tick (versus just counting it) you will likely have to handle a lot of data, which would most likely rule out the usage of arrays within MC, but would force you to use something outside of MC.
Can you provide an example of what you are trying to do exactly, as this might help in pointing you in the right direction?

Regards,

ABCTG

Hello ABCTG,

thanks for the reply. Save and collect huge amount of data it is not my scope also I wouldn't like to use something outside MC. My interest is to make a real time indicator that can plot the summation of almost every single contract sold at the same time with milliseconds precision (so with the same timestamps). For sure, after the understanding of the coding logic behind this, I will "play" with the data to see if it is better to filter them in a proper way and make some test to see what it can be achived and how those data can be useful.

With such an indicator my goal is :
1) Get notice of very Big Players entering the market with a lot of contract in a fraction of time
2) I would like to test some datafeed to compare the quality of datas and to see who's missing something.

Any link or guidelines will be appreciated as I really surfed a lot the web but I did not find any literature or easylanguage samples to understand how to access to those kind of data.


Regards,

David

Reply With Quote
Thanked by:
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

David,

for realtime use build your charts from second data i.e. use a 60 second chart instead of a 1 minute chart for example. The reserved word DateTime will give you access to the exact time of each tick then as it comes in.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #5 (permalink)
Dvdkite
Trieste Italy
 
Posts: 162 since Feb 2018
Thanks Given: 131
Thanks Received: 25

Hi @ABCTG,

I was able to access to the milliseconds data. Thanks for you help !! Now I have to play a little bit with the data in order to decide how to display and/or filter it and try to recognize a "buy" from a " sell" ...

Regards,

David

Reply With Quote
  #6 (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

Hi David,

The logic you would need for such a task is fairly straight forward. I did something similar a while back using NinjaTrader though it was for a different purpose.

1. Create a variable called CurrentMillisecond and one called LastMillisecond.
2. Create a variable called LargeVolume
3. For each millisecond change in your computers internal clock you print the aggregate volume of the variable LargeVolume (as long as this aggregate total is > a predefined threshold) So if you have a single millisecond timestamp and an aggregate total volume > 1,000 then you may classify this as a significant volume event and take note of it, but other milliseconds may have 10 or 100 contracts and you may wish to omit them from your indicator.
4. You will just need run your LargeVolume variable like this. LargeVolume = LargeVolume + Volume (Where volume is the MultiCharts syntax for the current transacted volume) I don't know the specific syntax here, but you just keep adding to your variable until the millisecond time stamp changes. Once your clock reference to Now.Millsecond <> CurrentMillsecond variable you would print the LargeVolume variable and then set it back to 0 and start counting from the next batch of transactions.
5. You will need to do this on a tick by tick basis. So you would need to go with a time independent level 1 feed that has the full level of granularity of each individual order. Once you start aggregating things to a bar based time frame the whole idea will fail.

Anyway, this is very easy to figure out the logic for. So you'll have no issues coding it..... but I do not believe that your premise (Identifying large orders) will work the way you expect. You will inadvertently also catch a lot of false positives as well. If 500 retail traders all put a stop at price = 2000, then they will join a market order queue and just wait. Now if on the opposite side there are also 500 limit orders at price = 2000 (potentially made up of hundreds of traders as well) then when the price hits 2000 during that exact millisecond you will see a huge fury of transactions hit as the market order queue and limit order queue matches traders. This may appear to be a large single power player, but in this example it is just the two queues hitting on the same price filling all traders involved. How can you tell if this huge 500 contract transaction was a large iceburg from a single party broken up into multiple pieces or lots of little guys hitting stops? You can't tell the difference. So for this reason, I would say that your premise is generally flawed for it's intended purpose. The only way around this issue that I see is to specifically filter for only orders that come after the first price level change event. The first instant that a price level gets hit, the exchange will clear both queues until there is no more action. It is only then, that this type of logic (Hunting for large orders) would ever be applicable. So you would have to burden yourself to filter all the action associated with price level changes out and only look at incremental orders that hit after the 2 queues touch for the first time. This would be more of a pain in the ass to program and you would likely lose 75% of all the action..... But anything that is left would in all likelyhood be legit.

I am not sure what value this would have for your trading, but it would be a pain to develop logic for.

Anyway, hope this gives you some ideas.

Best of luck!

Ian



Dvdkite View Post
Hello ABCTG,

thanks for the reply. Save and collect huge amount of data it is not my scope also I wouldn't like to use something outside MC. My interest is to make a real time indicator that can plot the summation of almost every single contract sold at the same time with milliseconds precision (so with the same timestamps). For sure, after the understanding of the coding logic behind this, I will "play" with the data to see if it is better to filter them in a proper way and make some test to see what it can be achived and how those data can be useful.

With such an indicator my goal is :
1) Get notice of very Big Players entering the market with a lot of contract in a fraction of time
2) I would like to test some datafeed to compare the quality of datas and to see who's missing something.

Any link or guidelines will be appreciated as I really surfed a lot the web but I did not find any literature or easylanguage samples to understand how to access to those kind of data.


Regards,

David


In the analytical world there is no such thing as art, there is only the science you know and the science you don't know. Characterizing the science you don't know as "art" is a fools game.
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on September 27, 2018


© 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