Color Crossing MovingAverage

Post Reply
phlux
Posts: 31
Joined: 19 Dec 2012 13:34

Color Crossing MovingAverage

Post by phlux »

Dear Users

Attached is an express code that represents the crossing average indicator in red/green in function of the direction of each line.

Best regards
Pascal
You do not have the required permissions to view the files attached to this post.
kiyohira
Posts: 32
Joined: 17 May 2013 12:41

Re: Color Crossing MovingAverage

Post by kiyohira »

Hello Pascal,

I am writing in English for better exposure in the community.

Thank you for your code as I am also trying to get a code for coloring lines according to trend but it seems that there are still bits of curve not colored properly (usually small variation): MACD for example.

Have you noticed it ?

Thanks.
User avatar
WHS Support
Posts: 2443
Joined: 14 Feb 2013 10:27

Re: Color Crossing MovingAverage

Post by WHS Support »

Hello kiyohira,

When using the following code in your program the gaps between the different coloured series can be filled:

//-----------------------------
if series1 >= series1[1] then begin
series1up = series1;
series1up = series1;
end
else series1up = void;
//-----------------------------

Could you try using that in your coloured MACD and see whether that solves that issue? Should this not help, you are welcome to provide us your code and we will see whether we can assist.

Regards,
Bastiaan
kiyohira
Posts: 32
Joined: 17 May 2013 12:41

Re: Color Crossing MovingAverage

Post by kiyohira »

Hello,

Thank you for the quick reply, I am too sure of what you really mean so I have enclosed my code (on Bollinger Bands) so that you can see where the problem comes from and since I have broken down the Bollinger Band Sup in 2 curves (bullish and bearish) you can clearly see now the bits of bullish and bearish curves except that some bits of curve do not show the right color and additionally some bits of curve are overlapping and in some cases the wrong color is displayed over the right one. :x

Thank you for your help. ;)

kind regards,

Jean-Christophe.
You do not have the required permissions to view the files attached to this post.
User avatar
WHS Support
Posts: 2443
Joined: 14 Feb 2013 10:27

Re: Color Crossing MovingAverage

Post by WHS Support »

Hi Jean-Christophe,

Thanks for sending your code. I have added it to my chart and I see the same occurs as for example with our coloured crossing MA indicator. With the current calculation, using the above mentioned formula, you will be able to plot two series. However, the limitation lies in the case where one series replaces the other where sometimes this causes both series to plotted, causing either the overlapping you have witnessed which may mean the incorrect series is covering the one which should in fact be visible. See the example below as an illustration.

If there is an overlap, the series which will be plotted on top of the other is the one which is the last series to be plotted in your express code. In the below illustration for example, the red series was the last series to be plotted in the program.

As of now, we have no other calculation to better plot this kind of indicator, but I am sure a programmer would find a way to improve this.

Regards,
Bastiaan
You do not have the required permissions to view the files attached to this post.
User avatar
WHS Support
Posts: 2443
Joined: 14 Feb 2013 10:27

Re: Color Crossing MovingAverage

Post by WHS Support »

Dear Trader,

due to the popularity of this tool we have decided to directly integrate a Coloured Moving Average in the WHS FutureStation Nano trading platform. In order to use it just choose the instrument you wish to trade and open "Template Studies" > "WHS Proposals":
1.jpg
You can also find them on our website with a short description in your own language:
3.jpg
We thank you for your input and ideas.

Kind regards,
WH SelfInvest
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “WHS NANOTRADER - EXPRESS PROGRAMMING”