global wrote: Thu Jul 06, 2023 10:16 am
Here is my new modified UT_XU-ADR D1_1.01_BT2.mq4. I added inputs that will now allow you to change all the "hard coded" colors. I also included comments within the code explaining how you can use the Modified Forex-Station button template sections within other indicators that draw buffer data you want to access by iCustom calls.
UT_XU-ADR D1_1.01_BT2.png
I updated this indicator a little by adding the weekly open, weekly hi & low and monthly hi & low levels. Of course I also added options to turn those new levels on/off with, show_Wk_Open, show_Wk_Openline, ShowPrev_WkMth_HiLo and ShowPrev_WkMth_HiLolines. Those new options are all on by default. However, if the lines and line labels are on and you change to different chart, the new labels will be displayed but their lines won't display. You will have to click the ARD button twice to turn off then turn on for the lines to display. I couldn't figure out why that is happening but it's not a big problem.
I also added the code below at the beginning of the start function to prevent deinitialization on every tick.
Code: Select all
//If ShowDisplay is "Off" deinitialize only once, not on every tick
if(!ShowDisplay) { if(!Deinitialized) { deinit2(); Deinitialized=true; } return(0); }
//Reset to Signal State of Non-deinitialization
Deinitialized=false;
I hope these additions are useful for you.