Cumulative Delta Mod

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Cumulative Delta Mod

Postby logicgate » Fri Jul 10, 2020 8:39 pm

Hi there dear friend.

Can you see if it is possible to add a reset time for this indicator? So in indicator settings the user could choose a reset time, for example the time when a new daily bar starts, or NY session start, etc...

Best regards
Attachments
CumulativeDelta.mq4
(21.09 KiB) Downloaded 240 times
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Cumulative Delta Mod

Postby Apprentice » Sat Jul 11, 2020 4:19 pm

Your request is added to the development list.
Development reference 1674.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Cumulative Delta Mod

Postby logicgate » Mon Jul 13, 2020 9:30 pm

My friend, I Was testing the indicator here and I discovered a flaw in the code that perhaps you might correct. This indicator, if you don´t have a tick history file generated by it, does not plot the data historically. You launch it then it starts plotting as the ticks come. So I thought I had overcome this issue by running the indicator in strategy tester, going back a couple of days and letting the tester run. It works nicely there, generates the file, ok, I grab the tick history file generated by the indi in the tester and paste it in the MQL4/File folder so when I launch the indi "live" it will plot the data historically. Ok, I launched, it worked. YAY! But nay... I realized that the data plotted with the incoming ticks "live" was looking different than the data in strategy tester. In the tester it looked right, when the indi is merging the incoming live data into the tick history file generated by the tester, something is off, and the bars looks compressed and kind of always going sideways. You will understand what I am talking about by looking at this images I made. The most horrible one was this morning uptrend in SP, the cumulative delta was going up all compressed and weird, and during the afternoon sell off it barely moved down. I knew something was off, than I replayed the strategy tester to see how it was supposed to look like, and lo and behold, I was right, In the tester it was looking very nice and right, and with the live data looking $h!t. I wonder if you can fix this.
Attachments
cumulative delta A.png
cumulative delta B.png
cumulative delta C.png
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Cumulative Delta Mod

Postby Apprentice » Tue Jul 14, 2020 9:18 am

Something like Session Cumulative Volume.lua
viewtopic.php?f=17&t=42392
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Cumulative Delta Mod

Postby logicgate » Wed Jul 15, 2020 6:43 pm

Hi there my friend, I was thinking here and correct me if this is nonsense, but perhaps a solution for this indicator would be to turn it into a script that would work just like MT4 strategy tester does.

How come the indicator works so beautifully in strategy tester replay, and ### up live?

The strategy tester reads the 1min .HST to "reproduce" the ticks, thus giving to the indicator the incoming ticks it needs to process. So, if we turn the indicator into a script, then it would read the .HST to plot the data. The .HST is updated at every second when we are in MT4 live, this would solve the problem of not having historical data when you load the indicator, you just choose in indicator settings how many bars of history to load. What do you think??
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Cumulative Delta Mod

Postby logicgate » Thu Jul 16, 2020 8:13 am

Those articles here explain the algorithm used in strategy tester to simulate ticks using the 1min timeframe:

https://www.mql5.com/en/articles/1511


https://www.mql5.com/en/articles/75
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Cumulative Delta Mod

Postby logicgate » Thu Jul 16, 2020 4:47 pm

Hi there buddy. I don´t remember if I posted this already. What I meant by "reading the hst file" is a code that will read the 1min .hst file and then generate artificial ticks for the cumulative delta indicator, like the strategy tester does. I found an article here that talks about the theory behind it:

https://www.mql5.com/en/articles/1511


I figure a competent programmer might come up with the code of artificial tick generation by understanding the theory.

I am willing to pay for this task as a freelance, if you think is doable and depending on the price.

Best regards
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Cumulative Delta Mod

Postby logicgate » Fri Jul 17, 2020 11:34 am

Hi there buddy, I have thought one more thing:

MT5 got tick history feature, right? So, if this cumulative delta is converted to MT5, then if we run it in strategy tester of MT5 it will run using real ticks, giving a 100% score on the backest. So you set the indicator to record ticks, when the tester finishes you quickly grab the file generated and paste it in MT4 to launch the indicator there, it will read a file created with the real ticks and I THINK that the data won´t get skewed.

The thing is that I was grabbing the recorded tick file from MT4 tester and telling the indicator to print that history, ok, but then when it starts plotting the current data with the live ticks, there is a data mismatch (simulated ticks vs real ticks), must be the reason why it starts plotting the bars all weird and compressed and going in wrong directions.

But don´t get me wrong, I still want the version with simulated ticks because it also gives very good readings.
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Re: Cumulative Delta Mod

Postby Apprentice » Tue Aug 04, 2020 4:29 am

I don't think it possible in any reasonable amount of time.
Will return to this task time allowing.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Cumulative Delta Mod

Postby logicgate » Tue Aug 04, 2020 1:22 pm

Apprentice wrote:I don't think it possible in any reasonable amount of time.
Will return to this task time allowing.


Sure, I understand. Do you think you could at least add a "reset time" input so the calculation will start from zero at the desired hour? Perhaps this is simpler task for the moment.
logicgate
FXCodeBase: Aspirant (Junior)
 
Posts: 680
Joined: Tue Dec 11, 2018 7:54 am

Next

Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 9 guests