Any script that opens a template on all open charts?
1 2 3 ...

thread: Any script that opens a template on all open charts?

  1. #1
    Junior Member alberpkparra94's Avatar
    23

    Any script that opens a template on all open charts?

    Anyone ever seen a script which will load a specific (of my choice) template on all open charts?

    I have one that will alter all open charts to given time period, nice to get thanks to zznbrm .
    https://www.cliqforex.com/attachment...1659200338.mq4

  2. #2
    Junior Member ThatWeedDude's Avatar
    28
    Super cool .... Thanks everybody

  3. #3
    Junior Member CarPattney's Avatar
    26
    Hi Saras

    1. The script.
    2. Save it in your MT4 Directory/Experts/Scripts
    3. Open all the charts you would like to change, right click on one of these and find the template you would like to replie to all charts starting from zero for the template until you find the one you desire. Eg. Template you want is 5th one down the template list, it is going to be 4 (0,1,2,3,4)
    3. Open Navigator menu to get experts,indiors scripts
    4. Drag the script on any chart, select the input then type in 4, and ok.

    Charts are all changed to the 5th template.

    Hope that helps ;--RRB-
    Will

  4. #4
    Can anybody explain step by step what to do in order to produce this script working? I dont understand.

  5. #5
    Any person can help show me the steps in specifics? I still don't understand how to do I read this info.
    Try the attached. It compiles with no errors. All I did was include the user32.dll import.

    Set the templateIndex parameter accordingly. The first template in MT4's dropdown list (menu: Charts Template ...) is 0, the next is 1, the third is two, etc. So if you wanted the fifth template in the list to be applied, type 4.

    Your designated template will be used to all charts. It worked for me (I'm running Win XP Home SP2 / br0ker FXDD / MT4 build 402).

    David

  6. #6
    Junior Member vivaelamor's Avatar
    24
    Men,

    This is a really slick script!

    Thank you and all. . .it works great.

  7. #7
    Junior Member alberpkparra94's Avatar
    23
    Thanks again zznbrm,

    It functions exactly like I want it to. .

    I have a weekly template I use to scan for potential set ups, then assign hot key's to each script, and with a single keystroke using your script ChgTF-All can drop down to a lower time frame on my pairs for entrance and with an additional keystroke using your ChangeTemplate-All can change all charts into my reduced T/F template. .
    (previously I had to of course change each chart one at a time)

    simple to simply rename and save a separate copy of your scripts using appropriate defaults to package my needs...

    Simplifiion is a beautiful thing...

  8. #8
    Junior Member Kavalieri's Avatar
    21
    Very cool... however when I attempt to compile it I get this error.

    'GetParent' - purpose isn't defined.
    Appears like assisted you with this. Through the years, I've added several other WinAPI works to my WinUser32.mqh document which aren't provided in the standard version contained in MT4. I forget about that occasionally! Glad you got it worked out.

    What I'm thinking is to have 2 copies of this script and then assign each a distinct template then assign every copy of the script a hot key... Together with my G11 (logitech) computer keyboard the scripts will then be but a single keystroke away. .
    Seems like a great idea!

  9. #9
    Junior Member alberpkparra94's Avatar
    23
    Thanks very much, works like a charm. .

    Thank you zznbrm for sharing the script, it is one of these little things that I will use every day .

    Due to David as well for your help....



    (win7, FXOpen, construct 402)

  10. #10
    Senior Member Tataylo's Avatar
    435
    Very cool... yet when I try to compile it I get this error.

    'GetParent' - function is not defined.
    Try the attached. It compiles without any errors. All I did was include the user32.dll import.

    Set the templateIndex parameter accordingly. The first template in MT4's dropdown list (menu: Charts Template ...) is 0, the next is 1, the third is two, and so on. So if you wanted the fifth template in the list to be applied, type 4.

    Your designated template will be used to all charts. It worked for me (I'm running Win XP Home SP2 / br0ker FXDD / MT4 build 402).

    David
    https://www.cliqforex.com/attachment...1653039773.mq4

  •