Requests & Ideas - page 103

 

Hi Flytox,

I did what you asked for, now it's possible to choose in which window you want the info panel and with the parameters Pan_X and Pan_Y you can pinpoint the position.

In the meantime, I've add also the possibility to calculate retracement and extension, for that now is version 6.5

This thing is going to be really addictive ...

Please read the instruction in the code and let me know if it match your expectation.

Best Regards

Flytox:
Thank you very much for this smart piece. I was wondering if there is anyway to change the position of the box, like corner left right etc..
Files:
 
mladen:
Here you go (there are 4 colors on those lines now)

PS: turning into gradient color would require making this an "all objects" indicator, and I really think that it would not be too much use of a "bufferless" indicator

regards

Mladen

Hello again MLaden,

Now that I had a chance to review the code in a bit more details. I would like to ask the significance of using Objects instead of two line buffers to draw the top and bottom line color change.

Thanks,

Pip

 

In order to draw lines in a non repainting mode (to make sure that under no circumstance there will be no repainting (in this case repainting as in making some 1 bar changes invisible)) we need 2 buffers per color (except for the 1st one - so for 4 colors 7 drawing buffers must be used) As you can see from the code there is already 6 buffers used which would mean that we are 2 buffers short for additional 2 colors.

Sure that there are some other ways, but they are not making sure that some errors in drawing can not happen. And that is why I used objects instead of buffers. They are simulating what metatrader line drawing engine does all the time : it interpolates 2 points with a straight line, and that is exactly what objects used in this indicator do now

To conclude : it was a necessity. I would like that metatrader has something like SetPlotColor() or plot() in tradestation where there is limitless number of colors choice, but not even metatrader5 can do that (64 colors only even there) so all I am left is to nag and do this as objects

Pip:
Hello again MLaden,

Now that I had a chance to review the code in a bit more details. I would like to ask the significance of using Objects instead of two line buffers to draw the top and bottom line color change.

Thanks,

Pip
 
mladen:
In order to draw lines in a non repainting mode (to make sure that under no circumstance there will be no repainting (in this case repainting as in making some 1 bar changes invisible)) we need 2 buffers per color (except for the 1st one - so for 4 colors 7 drawing buffers must be used) As you can see from the code there is already 6 buffers used which would mean that we are 2 buffers short for additional 2 colors.

Sure that there are some other ways, but they are not making sure that some errors in drawing can not happen. And that is why I used objects instead of buffers. They are simulating what metatrader line drawing engine does all the time : it interpolates 2 points with a straight line, and that is exactly what objects used in this indicator do now

To conclude : it was a necessity. I would like that metatrader has something like SetPlotColor() or plot() in tradestation where there is limitless number of colors choice, but not even metatrader5 can do that (64 colors only even there) so all I am left is to nag and do this as objects

Mladen,

Thank you for the detailed response. Based on your feedback, I attempted to expand the drawdot function to include more bars than just two. The aim is is cover more of the top and the bottom of the cycle with the color. Unfortunately however, when I do that the dots are drawn as straight lines instead of curved lines to cover the curvature of the wave. I realize this is due to the span of the connected dots (more than one bar apart). How can I add more points to make the objects more or less curved looking?

Code change:

drawDot(Time,Time,goertzel,goertzel,PeakEntryColor,PeakLinesWidth);

drawDot(Time,Time,goertzel,goertzel,PeakExitColor ,PeakLinesWidth);

And this is what it looks like

Also, as you can see, the most recent peak is not ploting the color changes as required.

Thanks,

Pip

Files:
multicolor.png  35 kb
 

Pip

Here you go Added "PeakSpan" parameter which allows you to have more than one bar colored around the peak

As of that peak on your picture : it is not a peak yet. It is going to become a peak when an opposite direction slope happens for the first time (without opposite direction slope it is still just a clear slope, regardless of its phase (for non-composite value) or apparent phase (of composite value))

PS: it does not check for overlap, so too long span can cause overlapped (single) color

regards

Mladen

Pip:
Mladen,

Thank you for the detailed response. Based on your feedback, I attempted to expand the drawdot function to include more bars than just two. The aim is is cover more of the top and the bottom of the cycle with the color. Unfortunately however, when I do that the dots are drawn as straight lines instead of curved lines to cover the curvature of the wave. I realize this is due to the span of the connected dots (more than one bar apart). How can I add more points to make the objects more or less curved looking?

Code change:

drawDot(Time,Time,goertzel,goertzel,PeakEntryColor,PeakLinesWidth);

drawDot(Time,Time,goertzel,goertzel,PeakExitColor ,PeakLinesWidth);

And this is what it looks like

Also, as you can see, the most recent peak is not ploting the color changes as required.

Thanks,

Pip
Files:
 
mladen:
Pip

Here you go

Added "PeakSpan" parameter which allows you to have more than one bar colored around the peak

As of that peak on your picture : it is not a peak yet. It is going to become a peak when an opposite direction slope happens for the first time (without opposite direction slope it is still just a clear slope, regardless of its phase (for non-composite value) or apparent phase (of composite value))

PS: it does not check for overlap, so too long span can cause overlapped (single) color

regards

Mladen

Thanks Mladen, very close to what I am looking for. The only thing that is not as expected is the timing for color plot. From what I understand, the indicator as is would wait for a peak to have occurred for the color change to plot but that is defeating the purpose because the information would be too late (from a coloring prospective for advance warning). My question is this, since the amplitude of the cycle is known or the combined amplitude is known from goertzel[] and goertzelfuture[] is not possible to put that in consideration to create a logic that looks for the next peak or trough and calculate current position in relation to that peak or trough? I believe by doing so the color change would happen in real time. Please let me know your thoughts.

Cheers,

Pip

 
mladen:
Caprica

Here you go

It is a standalone indicator now (no need for any external indicator) Made some minor changes too (coloring of past bars in multi color mode) and parameters are a bit different for Hodrick Prescott filter : in version 5.4 they were set to 34,69 while I used the 10,50 (simba original default values for those parameters) for default values, so if you are looking for version 5.4 values then set those parameters accordingly (and set the UseSquareAmpsto true) Then they will have exactly the same values


PS: you should check one more thing (for previous version) : maximal number of bars displayed on chart. If it is a big number set it to 5000 bars (it is quite enough for normal usage in trading - I use only 5000 bars all the time and I am not having any problems at all) The thing with Hodrick Prescott filter is that if it is called with default parameters for number of bars it will calculate all the bars all the time (it has to) and it will do that on all new ticks. So if you have a big number of bars on chart, it will be rather slow (this one will be faster but only because in this one I prevented default all bars calculation). So check the previous version with 5000 bars as a maximal number of bars in chart - I think that even that should not have problems then

regards

Mladen

Hi Mladen and Pip

Can I ask what your recommended settings are for maxper? the more I play around with this setting the more I get concerned about the ability for this indicator to find meaningful cycles.

thanks, Caprica

 

Caprica

In general, the longer the maxper, the more cycles will be identified and the extra cycles identified are probably going to be longer - now I am talking about "regular" cycles search, not the detrended cycles search. To do that turn the DetrendSmoothData to false. With detrended data it is a completely different game and than the main "work" is done in the Hodrick Prescot filter so you should concentrate on HP parameters then.

So, in "regular" mode, it depends what are you after : if you are after long cycles use longer maxper, if you are after shorter cycles, use shorter maxper.

regards

Mladen

caprica:
Hi Mladen and Pip

Can I ask what your recommended settings are for maxper? the more I play around with this setting the more I get concerned about the ability for this indicator to find meaningful cycles.

thanks, Caprica
 

Thank you very much brax, this is perfect.

brax64:
Hi Flytox,

I did what you asked for, now it's possible to choose in which window you want the info panel and with the parameters Pan_X and Pan_Y you can pinpoint the position.

In the meantime, I've add also the possibility to calculate retracement and extension, for that now is version 6.5

This thing is going to be really addictive ...

Please read the instruction in the code and let me know if it match your expectation.

Best Regards
 

Simple Idea

Hi NewDigital,

Perhaps a handy idea:

As this section is growing nicely, have the Advanced Elite section organized similar to Elite section (Indicators, EAs, etc).

Cheers,

San.