Re: Reorder Indicators on chart - Visual Layers Reordering in MT4

2
cortyk wrote: Thu Jun 17, 2021 5:34 am Hey guys,
Is it possible to visually reorder indicators on the chart in Mt4?
I imagine the chart as a layered Canva so that Indicators are one on top of each other.
Is it right?
I would like to know if there's a custom option to put one indicator on top of another or back as I prefer.
Any suggestion is appreciated.
Thanksssss
Sorry not understanding!

Re: Reorder Indicators on chart - Visual Layers Reordering in MT4

5
Deez wrote: Thu Jun 17, 2021 1:44 pm I think he is asking if we can rearrange:

SUBWINDOW
indi A
indi B
indi C

to C,A,B without having to delete and reapply.
Thanks for your answer Deez!
Your example is right but there's something that I am missing.
By saying "without having to delete and reapply" you are also saying that indicators on chart are applied one on top of each other by default.
Is this true?

Let's give some properties to those indicators so everything would be more clear.

Indi A = When applied on chart, it draws Blue rectangles around some candlestick areas
Indi B = When applied on chart, it draws Red circles around the same candlestick areas.

So now, if what you say is true, by firstly drag'n' drop indi A (Blue Rectangles) on the main chart and then indi B(Red Circles) on the same chart, in order I should see Red Circles over the Blue Rectangles.
Right?
And, as you said, If I want to rearrange the order of them I can simply delete the Indicator I'm willing to be on top of all the others and reapply it on the chart.

For me, this is not working at all.
I have an Info Panel indicator which I can't bring in front of the screen.
I've tried in the possible ways MT4 offers but nothing.
For example when opening the indicators properties, on the "Visualization Tab" there's a voice called "Show in the Data Window" which sometimes brings indicators on top even if it's no sense to me.

Anyway the issue happens also with candlesticks, in my example, they are hovering on top of the info panel.

I don't know if you guys ever use Photoshop or Illustrator for example, I imagined that MT4 worked like them via layers one on top of each other.
Am I wrong?
Is this something that only a programmer could handle?
For sure, but I wish something easier and user friendly would show up.
I hope this is a little bit more clear to all =)
Thanks for your precious time guys,
If you have any ideas please share them.
Cheers


Re: Reorder Indicators on chart - Visual Layers Reordering in MT4

6
cortyk wrote: Thu Jun 17, 2021 5:34 am Hey guys,
Is it possible to visually reorder indicators on the chart in Mt4?
I imagine the chart as a layered Canva so that Indicators are one on top of each other.
Is it right?
I would like to know if there's a custom option to put one indicator on top of another or back as I prefer.
Any suggestion is appreciated.
Thanksssss
yes there is a way to do it,
unfortunately i do not have an mt4 installation with me so,
in order to provide with a step by step "how to" save your current template and upload the file as an attachment here.
Hope you know what a template is and where the file is located , regards.
==============EDIT START
ok just found some lines of a tpl file on the net

the following instructions assume
a)you are using Notepad++ (is a free text editor)
b)the name of your template is ATemplate.tpl

1.create a copy of your original template and rename it to ACopyTemplate.tpl
2.go to Notepad++ and execute File->Open (locate the ACopyTemplate.tpl) and click on the button Open
3.now you have the template loaded in a tab, and you have to go from the top menu of the Notepad++ to menu Language and select XML
3.1.XML is making use of tags to indicate start and end of sections, tags starting with: <ATagName> and ending with < / ATagName>
4. Now go at the end of the document by pressing PgDown (right up of your keyboard)-or use the scrollbar to do so
5. At the absolute bottom you are reading closing (ending) tags like :

Code: Select all

</indicator>
</window>
</chart> 
 
5.1 Notice the order!!! the order indicates that the tags are nested
(window belongs to chart - indicator belongs to window - indicator and window belong to chart)
properties and settings of an indicator are inside an indicator tag etc. etc.
All indicators are displayed with the exact same order as they are in this file.
The top displayed first the last displayed last
5.2 somewhere up there are the opening tags of these same closing tags(you can spot them easily if you double click on the wanted tag)
5.3 what ever changes you will make you have to follow the structure of the XML language, fortunately we only need to move blocks up or down
5.4 we can identify the indicators by their name (name= your indicator name here ) the same EXACT name you see in your mt4 terminal
5.5 Indicators in sub windows have their own windows (if you have 2 or 3 in the same sub window they will be nested as well in the XML file)
5.5.1 so in order to move up or down an indicator from a sub window to another sub window you have to move a) the whole sub window up or down OR
b)move the specific indicator to another sub window
5.5.2 the MOVE action is as simple as cut and paste a block in the place you want it to be
5.6 Indicators in the main window : you can move them up or down and in a sub window as well if you create a new <window></window>
just bellow the last closing </window>(or in the exact order you want it to be)
and cut and paste your indicators tags with all its contents between the newly created window tags.
if you already have a sub window and you want the indicator from the main window
to this sub window you have to cut and paste the indicators tag with all its contents between the tags of this sub window.
5.7 Indicators from sub windows can be moved to the main window if you cut and paste the <indicator>name=your indicator</indicator> block
between the main window tags (main window is the first <window></window> tags), the last window tags in the file are sub windows.
if there are no sub windows your template will have only one window tag

all the above are the same for experts objects and all possible mt4 components in the terminal
6. Double click on a tag(example : <window>) in Notepad++ it will help you to easy locate start and end of a tag and also spot same tags at once
The following are sample lines of a *.tpl file ,
from what we have learn until know we are at the end of the *.tpl file and we are looking at two sub windows with one indicator each
AIndicatorALFA is inside the first sub window while
AIndicatorBHTA is inside the second sub window.

Code: Select all

	<window>           <!--this is a comment [Indicates the start of a WINDOW BLOCK]-->
	height=            <!--this is a comment [Propery of the window]-->
	fixed_height=      <!--this is a comment [Propery of the window]--> 
		<indicator>        <!--this is a comment [this indicates the start of an INDICATOR BLOCK with its properties]-->
		name=AIndicatorALFA<!--this is a comment [Propery of the indicator]-->
		color=16748574     <!--this is a comment [Propery of the indicator]-->
		style=0            <!--this is a comment [Propery of the indicator]-->
		weight=2           <!--this is a comment [Propery of the indicator]-->
		color2=16748574    <!--this is a comment [Propery of the indicator]-->
		style2=0           <!--this is a comment [Propery of the indicator]-->
		weight2=2          <!--this is a comment [Propery of the indicator]-->
		min=0.00000000     <!--this is a comment [Propery of the indicator]-->
		period_flags=31    <!--this is a comment [Propery of the indicator]-->
		show_data=1        <!--this is a comment [Propery of the indicator]-->
		</indicator>       <!--this is a comment [this indicates the end of an INDICATOR BLOCK with its properties]-->
	</window>          <!--this is a comment [Indicates the end of a WINDOW BLOCK]-->
<!--this is a comment this line indicates original position of lines and does not exist in an mt4  *.tpl file -->
	<window>
	height= 
	fixed_height= 
		<indicator>
		name=AIndicatorBHTA
		color=16748574
		style=0
		weight=2
		color2=16748574
		style2=0
		weight2=2
		min=0.00000000
		period_flags=31
		show_data=1
		</indicator>
	</window>
</chart> <!--this is a comment [Indicates the end of a CHART BLOCK]-->
EXAMPLE ONE : we will move AIndicatorBHTA inside the same SUB window of AIndicatorALFA and just below AIndicatorALFA

Code: Select all

	<window>           <!--this is a comment [Indicates the start of a WINDOW BLOCK]-->
	height=            <!--this is a comment [Propery of the window]-->
	fixed_height=      <!--this is a comment [Propery of the window]--> 
		<indicator>        <!--this is a comment [this indicates the start of an INDICATOR BLOCK with its properties]-->
		name=AIndicatorALFA<!--this is a comment [Propery of the indicator]-->
		color=16748574     <!--this is a comment [Propery of the indicator]-->
		style=0            <!--this is a comment [Propery of the indicator]-->
		weight=2           <!--this is a comment [Propery of the indicator]-->
		color2=16748574    <!--this is a comment [Propery of the indicator]-->
		style2=0           <!--this is a comment [Propery of the indicator]-->
		weight2=2          <!--this is a comment [Propery of the indicator]-->
		min=0.00000000     <!--this is a comment [Propery of the indicator]-->
		period_flags=31    <!--this is a comment [Propery of the indicator]-->
		show_data=1        <!--this is a comment [Propery of the indicator]-->
		</indicator>       <!--this is a comment [this indicates the end of an INDICATOR BLOCK with its properties]-->
		<!--this is a comment [HERE IS THE START OF THE MOVED BLOCK ]-->
		<indicator>
		name=AIndicatorBHTA
		color=16748574
		style=0
		weight=2
		color2=16748574
		style2=0
		weight2=2
		min=0.00000000
		period_flags=31
		show_data=1
		</indicator>
		<!--this is a comment [HERE IS THE END OF THE MOVED BLOCK ]-->
	</window>          <!--this is a comment [Indicates the end of a WINDOW BLOCK]-->
<!--this is a comment this line indicates original position of lines and does not exist in an mt4  *.tpl file -->
	<window>           <!--this is a comment [CONSIDER THIS LINE DELETED ]-->
	height=            <!--this is a comment [CONSIDER THIS LINE DELETED ]-->
	fixed_height=      <!--this is a comment [CONSIDER THIS LINE DELETED ]-->
	</window>          <!--this is a comment [CONSIDER THIS LINE DELETED ]-->
</chart> <!--this is a comment [Indicates the end of a CHART BLOCK]-->
EXAMPLE TWO : we will move indicator AIndicatorBHTA above the AIndicatorALFA inside the same sub window

Code: Select all

	<window>           <!--this is a comment [Indicates the start of a WINDOW BLOCK]-->
	height=            <!--this is a comment [Propery of the window]-->
	fixed_height=      <!--this is a comment [Propery of the window]--> 
		<!--this is a comment [HERE IS THE START OF THE MOVED BLOCK ]-->
		<indicator>
		name=AIndicatorBHTA
		color=16748574
		style=0
		weight=2
		color2=16748574
		style2=0
		weight2=2
		min=0.00000000
		period_flags=31
		show_data=1
		</indicator>
		<!--this is a comment [HERE IS THE END OF THE MOVED BLOCK ]-->
		<indicator>        <!--this is a comment [this indicates the start of an INDICATOR BLOCK with its properties]-->
		name=AIndicatorALFA<!--this is a comment [Propery of the indicator]-->
		color=16748574     <!--this is a comment [Propery of the indicator]-->
		style=0            <!--this is a comment [Propery of the indicator]-->
		weight=2           <!--this is a comment [Propery of the indicator]-->
		color2=16748574    <!--this is a comment [Propery of the indicator]-->
		style2=0           <!--this is a comment [Propery of the indicator]-->
		weight2=2          <!--this is a comment [Propery of the indicator]-->
		min=0.00000000     <!--this is a comment [Propery of the indicator]-->
		period_flags=31    <!--this is a comment [Propery of the indicator]-->
		show_data=1        <!--this is a comment [Propery of the indicator]-->
		</indicator>       <!--this is a comment [this indicates the end of an INDICATOR BLOCK with its properties]-->
	</window>          <!--this is a comment [Indicates the end of a WINDOW BLOCK]-->
<!--this is a comment this line indicates original position of lines and does not exist in an mt4  *.tpl file -->
	<window>           <!--this is a comment [CONSIDER THIS LINE DELETED ]-->
	height=            <!--this is a comment [CONSIDER THIS LINE DELETED ]-->
	fixed_height=      <!--this is a comment [CONSIDER THIS LINE DELETED ]-->
	</window>          <!--this is a comment [CONSIDER THIS LINE DELETED ]-->
</chart> <!--this is a comment [Indicates the end of a CHART BLOCK]-->
EXAMPLE THREE : we will move THE WINDOW OF indicator AIndicatorBHTA and all its contents above the AIndicatorALFA WINDOW

Code: Select all

    <!--this is a comment [HERE IS THE START OF THE MOVED BLOCK ]-->
	<window>
	height= 
	fixed_height= 
		<indicator>
		name=AIndicatorBHTA
		color=16748574
		style=0
		weight=2
		color2=16748574
		style2=0
		weight2=2
		min=0.00000000
		period_flags=31
		show_data=1
		</indicator>
	</window>
	<!--this is a comment [HERE IS THE END OF THE MOVED BLOCK ]-->
<window>           <!--this is a comment [Indicates the start of a WINDOW BLOCK]-->
	height=            <!--this is a comment [Propery of the window]-->
	fixed_height=      <!--this is a comment [Propery of the window]--> 
		<indicator>        <!--this is a comment [this indicates the start of an INDICATOR BLOCK with its properties]-->
		name=AIndicatorALFA<!--this is a comment [Propery of the indicator]-->
		color=16748574     <!--this is a comment [Propery of the indicator]-->
		style=0            <!--this is a comment [Propery of the indicator]-->
		weight=2           <!--this is a comment [Propery of the indicator]-->
		color2=16748574    <!--this is a comment [Propery of the indicator]-->
		style2=0           <!--this is a comment [Propery of the indicator]-->
		weight2=2          <!--this is a comment [Propery of the indicator]-->
		min=0.00000000     <!--this is a comment [Propery of the indicator]-->
		period_flags=31    <!--this is a comment [Propery of the indicator]-->
		show_data=1        <!--this is a comment [Propery of the indicator]-->
		</indicator>       <!--this is a comment [this indicates the end of an INDICATOR BLOCK with its properties]-->
	</window>          <!--this is a comment [Indicates the end of a WINDOW BLOCK]-->
<!--this is a comment this line indicates original position of lines and does not exist in an mt4  *.tpl file -->

</chart> <!--this is a comment [Indicates the end of a CHART BLOCK]-->
7. all your blocks must have start and end tags and must be correct nested other ways the results are unpredictable (most luckily mt4 will not interpret them)
so after you have moved your indicators save ACopyTemplate.tpl file and load in mt4 to see the results.

even thought this is a relative long reading the real process is simple if you grasp the concept.
hope it helps
regards
==============EDIT END

Re: Reorder Indicators on chart - Visual Layers Reordering in MT4

7
So now, if what you say is true, by firstly drag'n' drop indi A (Blue Rectangles) on the main chart and then indi B(Red Circles) on the same chart, in order I should see Red Circles over the Blue Rectangles.
Right?
And, as you said, If I want to rearrange the order of them I can simply delete the Indicator I'm willing to be on top of all the others and reapply it on the chart.

For me, this is not working at all.
regarding your way of thinking yes your correct... but
1) if an indicator or an expert creates new objects(lines, candles,arrows etc) without taking care of the placement order of these objects then naturally they fall one on another
2)if an indicator or an expert creates topmost window(s) then again this new window will always be on top of all other windows

the above and a lot of other similar bad programming practices are the result of poor design in programming,
for example there are a lot indicators out there that when they delete their child objects they as well delete all other objects ,
for these type of problems there is nothing you can do, unless you know how to write code and you are willing to fix the problem from the root up if of course the source code is available to you.


Who is online

Users browsing this forum: alimpe2000, Amazon [Bot], areteus1, ChatGPT [Bot], friend4you, Google [Bot], NasdaqBoss, Ricstar_8, sylvester21, xpf2003 and 92 guests