Copying trend lines or other objects to another chart

 

Hi,


Is there easier way to copy trend lines or fibs from one chart to another without doing the 'save template' function in MT4.


For example I have 2 charts, one 15 min and the other 4 hour. I draw some trend, horizontals, fibs lines etc... on the H4 but I want my H4 analysis (some or all) to be copied over to the 15 min chart without destroying my analysis on my 15 min chart if I did use the save template way. I wondering if I could copy over specific MT4 folders or could there be any indicators that does this?


Thanking all kindly,

Pete

 
Hi guys, so this is not possible then? :(
 

Hi,

This scripts set may be helpful for you...

 
Just change the timeframe of THAT chart, the objects will still be there.
 
fai:

Hi,

This scripts set may be helpful for you...

Thank you, I'll give it a try, The best to you.

 
WHRoeder:
Just change the timeframe of THAT chart, the objects will still be there.

No, the TF's I have are custom such as H6 etc.. I wish I could :(

 
sorry my coding skills are horrid but is there a way to add ObjectDescription to this, I have trend lines that use the description value and copying these without that loses value immensely
 

Yup! It's a little tricky but easy once you know how.

  1. Maximize the chart tso tabs are created near bottom of screen.
  2. Locate the tabs for each chart near bottom of screen.
  3. leftmost tab is #1, as you go to the right they increment by one.
  4. Write down source and destination chart numbers.
  5. Close MT4 (you can not modify files while open so you must close it)
  6. Go to > Program Files folder > MetaTrader >profiles > default (or profile you are using, most never touch this and are thus using default by default lol.)
  7. You will see files with corresponding chart numbers.
  8. Open source file number with Notepad.
  9. Below is an example of what an object record will look like. Locate the ones you want and paste them in the destination chart. (type 2=trendline, type22=arrows, type 21=text, etc... # are in the MT4 MetaEditor help files)
  10. Open MT4 and the objects will be there.

<object>
type=2
object_name=1093
period_flags=0
create_time=1336946511
description=2012.05.13 18:02:32 11
color=16711680
style=0
weight=0
background=0
time_0=1301521620
value_0=1.289000
time_1=1301521620
value_1=1.289110
ray=0
</object> 
 

pedropip,

you need to write 2 indicators:

1] this one is attached to the source chart and it uses FileWrite() function to write object details to a csv file.

2] this one is attached to the destination chart and it uses the appropriate FileRead_____() function to read object details from the referred csv file and creates objects using those details.

this way your objects are replicated on the destination chart.

cheers.

 
Use Template: Charts\Templates\Save Template
 
fai:

Hi,

This scripts set may be helpful for you...

Hello how do i apply this script to my chart?

Reason: