How many trade in a Laptime ?

Questions about MultiCharts and user contributed studies.
User avatar
Posts: 286
Joined: 02 Sep 2009
Location: ITALY
Has thanked: 84 times
Been thanked: 83 times

How many trade in a Laptime ?

Postby CrazyNasdaq » 06 Apr 2017

Hi, I'm trying to create a logic which collects how many trade are registered in a LapTime, but not a market Laptime which not makes trades every seconds but a normal Computer DateTime LAPTime.
I try to speak more clearly.
I'd like to know the numbers of trade every 10 seconds of normal time, the living time, not the time stamp of the market. The time is a mobile windows which updates continuously and not on market events as the financial markets do with a close which records sometimes and not continuously, sistematically. This way it could be that at certain time we have more trades, more speed of market in 10 seconds and on other times that speed decrease tremendously because the time pass without making any new trade.
Now the question is: How to combine the regular time pass with the irregular market event as a single trade ?
How to collect the numbers of trade with the mobile continuous time window ?
I know that I can update the logic with the "RecalcLastBarAfter(x seconds)". OK!!! but how to tell the logic to add or subtract trades because the time is passed even if the market event did not occur (the trade did not happen), so the number of trades is decreased only because the time is passed with no new trade.
Well, I'm having problems finding this logic in coding, because the 2 logics are separated and walk separately and it's difficult to find the bridge between them.
I've used "Computerdatettime", "currenttime_s" and so on to create a comparison with datetime or Time_s, but after that I don't know how to create the counter which increases or decreases after X real time.
Any suggestion is very well appreciated


Posts: 401
Joined: 19 Jan 2011
Location: Netherlands
Has thanked: 85 times
Been thanked: 123 times

Re: How many trade in a Laptime ?

Postby evdl » 06 Apr 2017

Have a look at this:

ELTic.dll and ELToc.dll

I did not try it myself. Maybe it can be of use to you.

Return to “MultiCharts”