Requests & Ideas - page 267

 
mladen:
Well

These are what Odysseus and me were cooking

According to Dennis Meyers description (Posted by Odysseus at this post : https://www.mql5.com/en/forum/179807/page34 ) of Repeated median calculation made 2 new indicators : Repeated median slope (which would correspond to Meyers' velocity indicator, but I preferred the slope n the name since it tells more exactly what it actually is), and a Repeated median line

Will describe them in reverse order (the slope is the basis for both, but I think better to describe the line first

__________________________

The Repeated median line can be treated as an alternative to Linear regression line (and Meyers is showing a comparison of the 2 in the document that can be downloaded from Odysseus' post) The repeated median line should be less sensitive to "bad data" and hence should reflect the price better. Here is a comparison of linear regression line (dotted lines) and Repeated median line (violet line)

There is a rather good description of why the difference happen and what is "omitted" (the so called "bad data") when applying repeated median calculation. What is added is one option that Dennis Meyers did not talk about : when drawing the line he uses current price as the starting point. I felt that it is misleading in some cases and decided to add an option which allows you to "anchor" the beginning of the line somewhere else. That way you can get something like this and that way the line is not moving with the current price as it changes but is anchored to a price that was valid on the "anchor" bar (so it is fixed until a new bar is opened)

__________________________

Repeated median slope can be treated as an equivalent for linear regression slope but you will find out that it is a "beast of it's own". Here is an example of a 20 bar repeated median slope on a 1 hour chart

Dennis Meyers describes a system where he uses the slope values from 0.02 to 0.4 and -0.2 to -0.4 as entries : that system can work only on some symbols (JPY crosses mostly) since the slope values for other symbols are much smaller so I think that the entries should be cheeked for around 0 value, but the system description is showing us something else to : we should treat each and every symbol as a "separate story" and no general rule should be applied to any system

__________________________

What is still pending (will be finished very soon) : right now I am making a dll for the slope version. If you use large Length in slope calculation you will find out that it is a rather slow calculation for large values and that will be corrected by dll, but did not want to make some "secrets" so the mql code shows exactly what is done and how the calculation is done

Found that someone is "sharing" this and claiming that the results are not the same as shown on the picture at the original post. Now, one thing is "sharing". Another thing is lying. Here is that same example and how it looks today. As it is obvious the results are exactly the same. So much about the truth and "truth"

Happy new year, yaroslavik

Files:
rml.gif  30 kb
 

Hi Mladen,

Happy New Year !

Here's a new request (I didn't give you much break recently). Can you please create an indicator that works this way

For a bar-

1) If a tick price is higher than the previous tick price, we call it an Up Tick. If a tick price is lower than the previous tick price, we call it a Down Tick. We call the price difference between any two adjacent Up Ticks “ Up Tick Difference”; We call the price difference between any two adjacent Down Ticks “Down Tick Difference”.

Sum up the absolute value of all Up Tick Differences for the bar and we call it Up Tick Difference Total; sum up the absolute value of all Down Tick Differences for the bar and we call it Down Tick Difference Total.

2) Divide the Up Tick Difference Total by number of Up Ticks of the bar ; divide the Down Tick Difference Total by number of Down Ticks of the bar. The two values we get from the divisions become the outputs of the indicator.

Thank you in advance,

pooh

 
pooh123:
Hi Mladen,

Happy New Year !

Here's a new request (I didn't give you much break recently). Can you please create an indicator that works this way

For a bar-

1) If a tick price is higher than the previous tick price, we call it an Up Tick. If a tick price is lower than the previous tick price, we call it a Down Tick. We call the price difference between any two adjacent Up Ticks “ Up Tick Difference”; We call the price difference between any two adjacent Down Ticks “Down Tick Difference”.

Sum up the absolute value of all Up Tick Differences for the bar and we call it Up Tick Difference Total; sum up the absolute value of all Down Tick Differences for the bar and we call it Down Tick Difference Total.

2) Divide the Up Tick Difference Total by number of Up Ticks of the bar ; divide the Down Tick Difference Total by number of Down Ticks of the bar. The two values we get from the divisions become the outputs of the indicator.

Thank you in advance,

pooh

pooh

That can be done only for ticks when the indicator starts to work on some time frame /symbol ( runtime data - there is no historical ticks data and it can not be reconstructed for the past). Is that what you had in mind?

 
mladen:
pooh That can be done only for ticks when the indicator starts to work on some time frame /symbol ( runtime data - there is no historical ticks data and it can not be reconstructed for the past). Is that what you had in mind?

Mladen,

Yes, I expected that.

pooh

 
pooh123:
Hi Mladen,

Happy New Year !

Here's a new request (I didn't give you much break recently). Can you please create an indicator that works this way

For a bar-

1) If a tick price is higher than the previous tick price, we call it an Up Tick. If a tick price is lower than the previous tick price, we call it a Down Tick. We call the price difference between any two adjacent Up Ticks “ Up Tick Difference”; We call the price difference between any two adjacent Down Ticks “Down Tick Difference”.

Sum up the absolute value of all Up Tick Differences for the bar and we call it Up Tick Difference Total; sum up the absolute value of all Down Tick Differences for the bar and we call it Down Tick Difference Total.

2) Divide the Up Tick Difference Total by number of Up Ticks of the bar ; divide the Down Tick Difference Total by number of Down Ticks of the bar. The two values we get from the divisions become the outputs of the indicator.

Thank you in advance,

pooh

Hi Mladen,

Sorry that I need change the logic for "Up Tick Difference" and "Down Tick Difference". This is the logic I need it to be:

Up Tick Difference= price of an Up Tick - price of the previous tick

Down Tick Difference= price of a Down Tick - price of the previous tick

The rest remain unchanged.

pooh

 
pooh123:
Hi Mladen,

Sorry that I need change the logic for "Up Tick Difference" and "Down Tick Difference". This is the logic I need it to be:

Up Tick Difference= price of an Up Tick - price of the previous tick

Down Tick Difference= price of a Down Tick - price of the previous tick

The rest remain unchanged.

pooh

pooh

Try this one out (I tested it in visual back test and it seems to be working OK). One option added : SameSide. If it is set to true the values are drawn on the same side of 0 (like the upper values on the example picture), otherwise it will show values like on the lower example. Also an option to use total ticks per bar or just the number of ticks that were up or down added

_____________________

PS: I guess that the results are going to look quite different at run-time than in this visual back test (this results are just showing how visual back test works, not how the real data looks like)

Files:
 

Merry Christmas, mladen.

Does this indicator requires adjustment for use in an EA?

Regards,

Paul

 
tamaraofx:
Merry Christmas, mladen.

Does this indicator requires adjustment for use in an EA?

Regards,

Paul

Paul

I am not sure that I understand the question

If the question is if the indicator needs some code changes so that it can be used from an EA, the answer is : no, no code changes needed for that indicator. It can be used from an EA perfectly well as it is now

 
mladen:
Paul

I am not sure that I understand the question

If the question is if the indicator needs some code changes so that it can be used from an EA, the answer is : no, no code changes needed for that indicator. It can be used from an EA perfectly well as it is now

Thanks, mladen. I used that indicator in an Ea but the EA runs so slow. That's why I asked. And because I've seen some of your indicators been revised for use in an ea.

Thanks again.

Paul

 
tamaraofx:
Thanks, mladen. I used that indicator in an Ea but the EA runs so slow. That's why I asked. And because I've seen some of your indicators been revised for use in an ea.

Thanks again.

Paul

Paul

Do not forget the first parameter (the TimeFrame). Use "" in iCustom() call as a first parameter and it should work OK (if you omitted that parameter it will run very slow and will return wrong results)

Reason: