One-click toggle between Japanese candlesticks and Heiken Ashi candles

TraderAAB

Trader
Aug 20, 2022
3
1
19
66
Denmark
Hello everyone

I created my own MT4 system, with a few indicators, for manual trading.
The system requires me to switch, regularly, between Heiken Ashi candles and Japanese candles.
This can be done by 2 consequent clicks, as follows:

Either:
1. Click on the icon "Line charts" (or Alt+3) ---> the Japanese candles disappear. The line graph is set to invisible (Color = None).
2. Click on Heiken Ashi Button/on-off indicator ---> Heiken Ashi candles appear.

Or (to reverse the change):
1. Click on Heiken Ashi Button/on-off indicator ---> Heiken Ashi candles disappear.
2. Click on the icon "Candlesticks" (or Alt+2) ---> the Japanese candles reappear.

Since, I'm at the charts for many hours, and do the above all the time, I need a one-click shortcut solution.

Can anyone help me create a Heiken Ashi button that toggles between the above-mentioned two sets of behavior?

PS. I have the following indicator with source code, if needed: Heiken Ashi AutoWidth Button.

Thank you.1752082831811.png1752082792328.png
 
OK. Let me explain this in a better way...

Here's a system I have on my MT4. OK?
1752166113104.png

When I click on the Heiken Ashi button (see bottom left) HA candles will appear as follows (see image below)
1752166520363.png

Here's my problem...
I don't like looking at a mix of Heiken Ashi (HA) candles AND Japanese candles at the same time! Therefore, I have to change to "line charts" (=Alt+3) to replace the Japanese (Jap) candlesticks with a line graph. And if I make the line graph invisible (Color = None) it'd look even better.
However, I don't like clicking twice each time I want a view with HA candles or Jap candles.
Therefore, I needed someone to adjust the button (seen on the chart above), so that when pushed, it'd show HA candles, WITHOUT Jap candles.

But...
Since I'm in a hurry, and since no one of you, busy guys and gals replied 🙂 Just kidding... I decided to reply to my own post.
I actually succeeded, with the help of ChatGPT and Gemini to solve the problem...
I improved the indicator, and now it toggles between showing HA candles without the Jap candles AND showing Jap candles when HA candles without HA candles. See the animation below:
View attachment Heiken Ashi AutoWidth button v2.00.mp4

I'm enclosing the improved version.
Hope you like it.
Asser
 

Attachments

  • 👍
Reactions: Enivid