Copying trend lines or other objects to another chart

Back to topics list To post a new topic, please log in or register
avatar
21
pedropip 2010.02.09 11:43
 

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

 
avatar
21
pedropip 2010.02.10 06:38 #
 
Hi guys, so this is not possible then? :(
avatar
64
fai 2010.02.10 07:13 #
 

Hi,

This scripts set may be helpful for you...

Attached files:
  00-scr-objectcopier_copy5.zip  (9.54 KB)
avatar
13004
WHRoeder 2010.02.10 17:22 #
 
Just change the timeframe of THAT chart, the objects will still be there.
avatar
21
pedropip 2010.02.10 19:24 #
 
fai:

Hi,

This scripts set may be helpful for you...

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

avatar
21
pedropip 2010.02.10 19:26 #
 
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 :(

avatar
2
dracozny 2010.12.16 06:18 #
 
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
 
avatar
7
yoleo 2012.05.17 06:48 #
 

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> 


 
avatar
2
pgd 2012.06.12 06:30 #
 

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.


 
avatar
26
winters 2015.07.25 20:44 #
 
Use Template: Charts\Templates\Save Template
Back to topics list  

To add comments, please log in or register