Re: Coding Help

1132
JNS247 wrote: Fri Jul 10, 2020 10:05 am Hi
Need assistance in adding a button on the following indicator
I have manged to create the button, the control of the line (Show data) is creating all sorts of problems.
The code added by me is delineated by //************

Would you be able to assist?
Thanks in advance.
Hello Banzai
I have managed to create the button, no errors on the compile, however, I'm missing the control of the supertrend line, I can switch the state on the button but it does not control anything.
Button code copied from day_seperator_2_2 button
delineated by //************
Would you be able to assist?
I'll keep trying I have managed to a a button before just got to find the right spot for the code :-)
Thanks in advance.
These users thanked the author JNS247 for the post:
Banzai

Re: Coding Help

1133
JNS247 wrote: Tue Jul 14, 2020 12:50 pm

Hello Banzai
I have managed to create the button, no errors on the compile, however, I'm missing the control of the supertrend line, I can switch the state on the button but it does not control anything.
Button code copied from day_seperator_2_2 button
delineated by //************
Would you be able to assist?
I'll keep trying I have managed to a a button before just got to find the right spot for the code :-)
Thanks in advance.
SuperTrend nrp new format (mtf + arrows + alerts).mq4
You see, this indicator use the OnCalculate function.
All of our templates use the start() function.
Now the only template that use the OnCalculate function is mrtools template
"ma - with button.mq4"
which is at
viewtopic.php?p=1295414482#p1295414482

Attached is a working indicator based on mrtools template.

It's not over yet.
When we switch to mtf, this indicator doesn't work.
the state of the button such as on or off
doesn't pass along to the mtf
-------------------------------------------------------------
There's more.

Assuming you can make the mtf function to work,
the next step is to make 8 mtf buttons like these:

[M1 Supertrend] [M5 Supertrend] [M15 Supertrend] [M30 Supertrend] [H1 Supertrend] [H4 Supertrend] [D1 Supertrend] [W1 Supertrend] [MN Supertrend]

Then, we will another issue.
The UniqueButtonID doesn't pass along to the right button.

All coders are busy so will take a while to get the OnCalculate template.
These users thanked the author Banzai for the post (total 2):
moey_dw, JNS247

LikeRe: Coding Help

1134
Banzai wrote: Tue Jul 14, 2020 3:47 pm

SuperTrend nrp new format (mtf + arrows + alerts).mq4
You see, this indicator use the OnCalculate function.
All of our templates use the start() function.
Now the only template that use the OnCalculate function is mrtools template
"ma - with button.mq4"
which is at
viewtopic.php?p=1295414482#p1295414482

Attached is a working indicator based on mrtools template.

It's not over yet.
When we switch to mtf, this indicator doesn't work.
the state of the button such as on or off
doesn't pass along to the mtf
-------------------------------------------------------------
There's more.

Assuming you can make the mtf function to work,
the next step is to make 8 mtf buttons like these:

[M1 Supertrend] [M5 Supertrend] [M15 Supertrend] [M30 Supertrend] [H1 Supertrend] [H4 Supertrend] [D1 Supertrend] [W1 Supertrend] [MN Supertrend]

Then, we will another issue.
The UniqueButtonID doesn't pass along to the right button.

All coders are busy so will take a while to get the OnCalculate template.
Much appreciated will give it a go and see where I end up Thanks again

Re: Coding Help

1135
Hi,

ADX angle (above 40) is most important in any trades, Will it be possible to code when ADX divergence significant
1) when all (+DI and -DI) cross each other/originate at the same point at a particular period (15)
2) and when the ADX angle is above 40

Any arrow/indication at the ADX origin (when the angle reaches 40) will be fine to scan through many scripts,

TIA
Mannan
Attachments


Re: Coding Help

1136
JNS247 wrote: Tue Jul 14, 2020 5:17 pm Much appreciated will give it a go and see where I end up Thanks again
It's here. A template to handle the OnCalculate function.
By comparing the two files, we can make a template.
And then, it's just a matter of copy and paste to make other indicators.

The coder is Mario Jemic. His link is in the code.
These users thanked the author Banzai for the post:
JNS247

Re: Coding Help

1137
Banzai wrote: Tue Jul 14, 2020 3:47 pm

SuperTrend nrp new format (mtf + arrows + alerts).mq4
You see, this indicator use the OnCalculate function.
All of our templates use the start() function.
Now the only template that use the OnCalculate function is mrtools template
"ma - with button.mq4"
which is at
viewtopic.php?p=1295414482#p1295414482

Attached is a working indicator based on mrtools template.

It's not over yet.
When we switch to mtf, this indicator doesn't work.
the state of the button such as on or off
doesn't pass along to the mtf
-------------------------------------------------------------
There's more.

Assuming you can make the mtf function to work,
the next step is to make 8 mtf buttons like these:

[M1 Supertrend] [M5 Supertrend] [M15 Supertrend] [M30 Supertrend] [H1 Supertrend] [H4 Supertrend] [D1 Supertrend] [W1 Supertrend] [MN Supertrend]

Then, we will another issue.
The UniqueButtonID doesn't pass along to the right button.

All coders are busy so will take a while to get the OnCalculate template.
Hello Banzai, I will attempt the on_off button on the MTF Fractal as this one use the start function and the template of the day seperator is fairly clear
will post it once I get it working on the On_Off post
Regards
These users thanked the author JNS247 for the post:
Banzai

Re: Coding Help

1138
[/quote]

Hello Banzai, I will attempt the on_off button on the MTF Fractal as this one use the start function and the template of the day seperator is fairly clear
will post it once I get it working on the On_Off post
Regards
[/quote]
Hello Banzai

It is doing my head in, at one stage I managed to get the button on the chart, now it is nowhere to be found.
Like a challange but not getting this to work
I have used the day_seperator_2_2 code, one difference I noticed was the init and OnInit the start functions are the same and so the deinit, reading the MQL Help reference is just blowing my mind.
it compile without errors
I'll leave it to the pros.
When you have time thanks in advance.
JNS

Re: Coding Help

1139
JNS247 wrote: Wed Jul 15, 2020 8:32 pm Hello Banzai
We still have some problems with mtf
Here are the latest code releases on July 15th, 2020

If we use mtf, sometime the buttons disappear.
Sometime, not all the time.
So I think it's MT4 fault.
These users thanked the author Banzai for the post (total 2):
JNS247, yamahaqs300


Who is online

Users browsing this forum: No registered users and 7 guests