Skip This Ad >>
 
Register
Forgotten your password?
The Facebook Platform
Forex-TSD - Powered by vBulletin
Loading search...
Advanced search
  • Home
  • Forums
    Free sections Exclusive sections All sections
  • Register
    Create new account
  • More Recent
    Latest Threads Today's Posts
  • Rankings
    Most popular threads this month Most popular threads created this month Most linked threads this month Most active users Most reputed users
  • Calendar
  • Advertising
  • Others
    Blogs Toolbar
  • Help
    Contact Us FAQ
  • Premium Forum
  • Home
  • Forum
  • Training
  • Metatrader
  • Metatrader 4 mql 4 - Development course
  • Lessons
  • The Code Wizard Templates.

Thread: The Code Wizard Templates.



  • LinkBack
    • LinkBack URL LinkBack URL
    • About LinkBacks About LinkBacks
    •  
    • Bookmark & Share
    • Digg this Thread!
    • Add Thread to del.icio.us
    • Bookmark in Technorati
    • Tweet this thread
  • Thread Tools
    • Show Printable Version
    • Email this Page…
    • Subscribe to this Thread…
  • Display
    • Switch to Hybrid Mode
    • Switch to Threaded Mode
Results 1 to 9 of 9
0 0 Attachment(s)

  1. 03-31-2008 07:32 PM #1
    cockeyedcowboy's Avatar
    cockeyedcowboy
    cockeyedcowboy is offline Senior Member
    Points: 9,598, Level: 11
    Level completed: 82%, Points required for next Level: 202
    Overall activity: 13.0%
    Join Date
    Nov 2005
    Posts
    529
    Points
    9,598
    Level
    11
    Achievements:
    Your first GroupCreated Album picturesVeteran250 Experience Points

    The Code Wizard Templates.

    I saw a thread some were that showed different secrets of the MQ platform that were not documented or poorly documented. But can not find it again, so I started this thread. ND you can move it if you like.

    This has to do with the code wizard templates not the chart templates. MT gives you a few general ones and some custom to build indicators. What I have done was to create my own general templates. One for experts, one for scripts, one for indicators, etc.. (see the screen shot). The trick is to create your own and name them as the ones that MQ will use. MQ doesnot know its different. It only knows it by the name. Be sure to make a backup copies of your work, as each time you up date to a new build MT will replace them with the original ones again, deleting yours.

    Whats the benefit of this? It lets you start with your own code format and style. You can include links to your include files and libraries or any thing else you use with most of your work. Any MQ4 code or dlls can be used. The first code below is the MQ's template expert.mqt file. All one has to do is to remove the code as shown below and add any code block with comments etc. that you like. A very simple way.


    Code:
     
    <expert>
      type=EXPERT_ADVISOR
    </expert>
    #header#
    #property copyright "#copyright#"
    #property link      "#link#"
    #extern_variables#
     
    <<<<<<<<<<<<<< REMOVE LINES BELOW AND ADD YOUR CODE >>>>>>>>>>>>>>>>>
     
    //+------------------------------------------------------------------+
    //| expert initialization function                                   |
    //+------------------------------------------------------------------+
    int init()
      {
    //----
     
    //----
       return(0);
      }
    //+------------------------------------------------------------------+
    //| expert deinitialization function                                 |
    //+------------------------------------------------------------------+
    int deinit()
      {
    //----
     
    //----
       return(0);
      }
    //+------------------------------------------------------------------+
    //| expert start function                                            |
    //+------------------------------------------------------------------+
    int start()
      {
    //----
     
    //----
       return(0);
      }
    //+------------------------------------------------------------------+
    The second code block is part of my expert.mqt file. As you can see there is a lot more you can do that MQ documentation shows. Remember this is only part of my file. You should create one that fits you.

    My template may be a little more advance then one needs but it points out other things that can be done. This expert.mqt file has #define statments which the wizard fills in for me. If you notice there are no #property statements as they are included in to my main library file. Which gets feed the information from the wizard as well. The define statments now can be called or used any were in your code.


    Code:
     
    <expert>
        type=EXPERT_ADVISOR
        revised=01-01-2007
    </expert>
    //»»» MetaQuote [ MQ 4 ] »»»»»»»»»»»»»»»»»»»»»»»»««««««««««««««««««««««««««««««««««««««««««««««««««
    //»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»    IDENTIFICATION DIVISION    ««««««««««««««««««««««««««««««««««
    //»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»««««««««««««««««««««««««««««««««««««««««««««««««««
     
                        #define   ProgramName         ""
                        #define   SystemSymbol        ""
                        #define   Author              "#copyright#"
                        #define   eMail               "#link#"
                        #define   TradeName           "WinSoft Technology ™ "
                        #define   Licensee            ""
                        #define   ModuleType          "Expert Advisor"
                        #define   DateWriten          "00.00.2008"
                        #define   VersionNumber       "v1.00.01a"
                        #define   LastUpDate          ""
                        #define   VersionRelease      "Alpha Version"
                        #define   ProgramLanguage     "MetaQuote ® MQL v4.00, b213"
                        #define   ScriptLanguage      "Lore Language ® v2.70"
                        #define   SecurityLevel       "Private Document"
                        #define   Documentation       "see Documentation Division"
                        #define   CopyRight           "CopyRight © 2008"
     
     
     
    /*  ««« COPYRIGHT NOTICE: »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
                        This program is the unpublished works of the  author and a
                        part of his private library. It is protected as such under
                        the United States Copyright laws.  No part of this program
                        may be used or re-produced for any purpose, in any form or
                        by any means, or stored in a database or retrieval system.
                        Making copies and or use of this program without the prior
                        writen  permission of the author, is strictly  prohibited.
                        No offers are being  made to the public for  distribution,
                        sale, re-sale or usage. WinSoft  Technology  is a registed
                        TradeName of the author and doesnot constitute a transfer.
     
                                        ~~~ #copyright# ~~~
     
    //»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»««««««««««««««««««««««««««««««««««««««««««««««««««««
    //»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»    ENVIRONMENTAL DIVISION    «««««««««««««««««««««««««««««««««««
    //»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»««««««««««««««««««««««««««««««««««««««««««««««««««*/
        // ««« FILE LINKAGE SECTION: »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
                    #include    <Implement/Lore Language ® v2.70/Script Engine © v2.70>
                    #include    <Implement/MetaQuote ® v4.00/MQ4 RunTime Module © v1.70>
        // ««« DEFINED CONSTANT SECTION: »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
     
        // ««« EXTERN INPUT PARAMETER SECTION: »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
     
        // ««« DEFAULT SYSTEM PROCESS SECTION: »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
     
        // ««« SYSTEM DEFAULT SECTION: »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
     
        // ««« GLOBAL SCOPE VARIABLES SECTION: »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
     
        // ««« GLOBAL SCOPE ARRAYS SECTION: »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
     
        // ««« MODULE DECLARATION SECTION: »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
     
    //»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»««««««««««««««««««««««««««««««««««««««««««««««««««««
     
     
     
     
    <<<<<<<  REST OF TEMPLATE FILE HAS BEEN DELETED TO MAKE IT SHORTER FILE  >>>>>>>>>>>>>>>>>>>

    Theres a lot more to this then I am showing you but mine may be to complicated for most. If you start with the simple example above, then try adding some other things of your own. Just remember to save a back up copy of your work because MQ will replace it with their code each time you update MQ.

    Keit
    Last edited by cockeyedcowboy; 05-18-2010 at 08:53 PM.
    • Share
      • Share this post on
      • Digg
      • Del.icio.us
      • Technorati
      • Twitter
    Reply With Quote Reply With Quote

  2. 04-01-2008 12:07 AM #2
    Linuxser's Avatar
    Linuxser
    Linuxser is offline Forum Staff
    Join Date
    May 2006
    Location
    Helliconia (Summer)
    Posts
    4,732
    Achievements:
    Three FriendsYour first GroupRecommendation First Class
    Blog Entries
    64
    Glad to find a friend in the road.

    I was testing ideas like you have. Mainly focused on crate a custom installation of MT4. Something like Forex-TSD MT4.

    Because that I've asked some help: Exe Extractor and INNO setup

    I was looking for way to include many indicators/EA/servers in one setup.

    This indeed to extract a MT setup, include what you want and create a new setup with maybe 100 indicators or more.

    Main problem is, as you showed in the picture, after setup is running a temp folder (presetup) is created but the file inside are delivered in a way I can't understand.

    I believe the next step after you've clicked everything the setup will unpack the default files.

    Maybe we could work together.
    • Share
      • Share this post on
      • Digg
      • Del.icio.us
      • Technorati
      • Twitter
    My Blog on TSD! | subscribe Exclusive Elite | subscribe Advanced Elite section.
    Reply With Quote Reply With Quote

  3. 04-01-2008 02:20 AM #3
    omelette
    omelette is offline Senior Member
    Points: 104,288, Level: 46
    Level completed: 69%, Points required for next Level: 1,512
    Overall activity: 0%
    Join Date
    Jan 2006
    Posts
    1,118
    Points
    104,288
    Level
    46
    Achievements:
    Recommendation Second ClassVeteran500 Experience Points
    Theres a lot more to this then I am showing you but mine may be to complicated for most. If you start with the simple example above, then try adding some other things of your own. Just remember to save a back up copy of your work because MQ will replace it with their code each time you update MQ.

    Keit
    Hell, it's too complicated as it is!

    Could you give a specific example of where altering these template files would prove useful? I see references to your scripting language included in the examples (I first recall seeing this in a Hans123 EA you posted on StrategyBuilderFX years ago..). What added functionality does this provide, above and beyond what one could achieve with MQL?

    Personally, I'd be all for delving deeper into the innards on MT if I thought I had well and truly cracked the 'HolyGrail' problem - until then, it just seems like a solution that is looking for a problem...
    • Share
      • Share this post on
      • Digg
      • Del.icio.us
      • Technorati
      • Twitter
    Reply With Quote Reply With Quote

  4. 04-01-2008 03:03 AM #4
    cockeyedcowboy's Avatar
    cockeyedcowboy
    cockeyedcowboy is offline Senior Member
    Points: 9,598, Level: 11
    Level completed: 82%, Points required for next Level: 202
    Overall activity: 13.0%
    Join Date
    Nov 2005
    Posts
    529
    Points
    9,598
    Level
    11
    Achievements:
    Your first GroupCreated Album picturesVeteran250 Experience Points
    Quote Originally Posted by omelette View Post
    Hell, it's too complicated as it is!

    Could you give a specific example of where altering these template files would prove useful? I see references to your scripting language included in the examples (I first recall seeing this in a Hans123 EA you posted on StrategyBuilderFX years ago..). What added functionality does this provide, above and beyond what one could achieve with MQL?

    Personally, I'd be all for delving deeper into the innards on MT if I thought I had well and truly cracked the 'HolyGrail' problem - until then, it just seems like a solution that is looking for a problem...

    You are right my version of the Hans123 EA was created using this setup as a starting point. If you remember that then you will remember that alot of people wanted me to give them my libraries which I refused. May be I should show people how to create multi purpose libraries of there own.

    Any ways, this is not about libraries and its in no way going to help you break the mystery of the HolyGrail. I use this to set up a begaining file the way I start a code project which includes my external libraries. When you start a new code project the file that mq creates looks like whats in the screen shot attached. You can however, have mq create the file containing anything you want by altering the existing files. The file can be made to your preferance and style of coding. You do not have to use the default mq format. Once you change the file, mq will start with your file after that not the MQ file you see below.


    Keit
    Last edited by cockeyedcowboy; 05-18-2010 at 08:53 PM.
    • Share
      • Share this post on
      • Digg
      • Del.icio.us
      • Technorati
      • Twitter
    Reply With Quote Reply With Quote

  5. 04-01-2008 03:23 AM #5
    cockeyedcowboy's Avatar
    cockeyedcowboy
    cockeyedcowboy is offline Senior Member
    Points: 9,598, Level: 11
    Level completed: 82%, Points required for next Level: 202
    Overall activity: 13.0%
    Join Date
    Nov 2005
    Posts
    529
    Points
    9,598
    Level
    11
    Achievements:
    Your first GroupCreated Album picturesVeteran250 Experience Points
    Linuxser

    If I'am understanding you right your talking about something different. You can use a setup program to install either a complete MT platform with all your other files or have it install over an existion MT directory. Theres one problem most install packages will write to the windows registry keys. These entries is how windows knows were the files are located. Most people using MT tend to move files around and delete file manually when no longer need. this will cause registry enteries not to be cleared, if one doesnot use the uninstall to remove the programs. Once the files are deleted manually you may not be abile to use the uninstall after that to clear the registry keys. What you are asking can be done but you need to do it without writing to the registries.

    Keit
    • Share
      • Share this post on
      • Digg
      • Del.icio.us
      • Technorati
      • Twitter
    Reply With Quote Reply With Quote

  6. 04-01-2008 03:46 AM #6
    Linuxser's Avatar
    Linuxser
    Linuxser is offline Forum Staff
    Join Date
    May 2006
    Location
    Helliconia (Summer)
    Posts
    4,732
    Achievements:
    Three FriendsYour first GroupRecommendation First Class
    Blog Entries
    64
    Quote Originally Posted by cockeyedcowboy View Post
    Linuxser

    If I'am understanding you right your talking about something different. You can use a setup program to install either a complete MT platform with all your other files or have it install over an existion MT directory. Theres one problem most install packages will write to the windows registry keys. These entries is how windows knows were the files are located. Most people using MT tend to move files around and delete file manually when no longer need. this will cause registry enteries not to be cleared, if one doesnot use the uninstall to remove the programs. Once the files are deleted manually you may not be abile to use the uninstall after that to clear the registry keys. What you are asking can be done but you need to do it without writing to the registries.

    Keit
    Hi,

    I re-read the first post carefully and I saw something different first time. Sometimes you see what you want .

    Problem is not the registry because MT works clean in presetup. Just after last click some values are write into the registry, the problem is no easy to solve. In fact you can edit some files previous installation as cockeyedcowboy is editing templates to set directory, name, whatever, it's very funny.
    • Share
      • Share this post on
      • Digg
      • Del.icio.us
      • Technorati
      • Twitter
    My Blog on TSD! | subscribe Exclusive Elite | subscribe Advanced Elite section.
    Reply With Quote Reply With Quote

  7. 04-01-2008 01:01 PM #7
    omelette
    omelette is offline Senior Member
    Points: 104,288, Level: 46
    Level completed: 69%, Points required for next Level: 1,512
    Overall activity: 0%
    Join Date
    Jan 2006
    Posts
    1,118
    Points
    104,288
    Level
    46
    Achievements:
    Recommendation Second ClassVeteran500 Experience Points
    Quote Originally Posted by cockeyedcowboy View Post
    You are right my version of the Hans123 EA was created using this setup as a starting point. If you remember that then you will remember that alot of people wanted me to give them my libraries which I refused. May be I should show people how to create multi purpose libraries of there own.
    .....
    Yes, I do remember that also - but this was not an indirect way of asking you for them now either, I was just genuinely curious!

    Thanks for pointing out exactly what templates you were referring to, I wasn't at all sure, but have now seen the light. I still think though that although it's useful to be able to 'arrange' your code-space to your own requirements, it is a little above-and-beyond what most still struggling with MQL itself (myself included) will devote much time to - just my opinion obviously!
    • Share
      • Share this post on
      • Digg
      • Del.icio.us
      • Technorati
      • Twitter
    Reply With Quote Reply With Quote

  8. 04-01-2008 03:33 PM #8
    cockeyedcowboy's Avatar
    cockeyedcowboy
    cockeyedcowboy is offline Senior Member
    Points: 9,598, Level: 11
    Level completed: 82%, Points required for next Level: 202
    Overall activity: 13.0%
    Join Date
    Nov 2005
    Posts
    529
    Points
    9,598
    Level
    11
    Achievements:
    Your first GroupCreated Album picturesVeteran250 Experience Points
    Quote Originally Posted by omelette View Post
    Yes, I do remember that also - but this was not an indirect way of asking you for them now either, I was just genuinely curious!

    Thanks for pointing out exactly what templates you were referring to, I wasn't at all sure, but have now seen the light. I still think though that although it's useful to be able to 'arrange' your code-space to your own requirements, it is a little above-and-beyond what most still struggling with MQL itself (myself included) will devote much time to - just my opinion obviously!

    Yes Omelette,

    As I said in the first post, that what I use is, in most cases, too advance then what most will need. People here came because of Forex not programing, however a lot have picked up on the programing end too. Just though to give some idears.

    In case some are still a little confussion as to which templates and wizard I am talking about ...

    Keit
    Last edited by cockeyedcowboy; 05-18-2010 at 08:53 PM.
    • Share
      • Share this post on
      • Digg
      • Del.icio.us
      • Technorati
      • Twitter
    Reply With Quote Reply With Quote

  9. 05-30-2011 12:45 AM #9
    eyeopr8r
    eyeopr8r is offline Junior Member
    Points: 214, Level: 1
    Level completed: 54%, Points required for next Level: 186
    Overall activity: 0%
    Join Date
    May 2011
    Posts
    1
    Points
    214
    Level
    1
    Achievements:
    3 months registered100 Experience Points

    Can't access the Metatrader 4 mql 4 - Development course

    I've spent 30 minutes tryig to actually access the Metatrader 4 mql 4 - Development course without success. can someone give me a link directly to the course?? thanks
    • Share
      • Share this post on
      • Digg
      • Del.icio.us
      • Technorati
      • Twitter
    Reply With Quote Reply With Quote

0 0 Attachment(s)

Quick Navigation Lessons Top
  • Site Areas
  • Settings
  • Private Messages
  • Subscriptions
  • Who's Online
  • Search Forums
  • Forums Home
  • Forums
  • Announcements
    1. Announcements Blog
  • Exclusive Forum
    1. Elite Section
  • Forex Press
    1. Analytics
    2. Articles
    3. Success Stories
  • Discussion Areas
    1. General Discussion
    2. Metatrader 4
      1. Metatrader 3
    3. Metatrader 5
    4. Post and compare Trades
    5. Setup Questions
    6. Suggestions for Trading Systems
    7. Documentation
    8. Strategy Trader
  • Non Related Discussions
  • Downloads
    1. Indicators - Metatrader 4
      1. Indicators - Metatrader 3
      2. Indicators - Metatrader 5
    2. Manual trading systems
    3. Expert Advisors - Metatrader 4
      1. TSD Expert Advisors
      2. Expert Advisors - Metatrader 5
      3. Expert Advisors - Metatrader 3
    4. Tools and utilities
    5. Tools and utilities - Strategy Trader
  • Trading systems
    1. CatFx50
    2. Brain Systems
    3. Ema Cross
    4. Harmonic trading
    5. The "XO"-Method
    6. Phoenix
    7. Dolly
    8. Digital Filters
    9. Martingale/Average Cost and Hedging
  • Automated Trading
    1. News/Signal Trading
    2. FX Signals Marketplaces
  • Commercial systems
    1. Commercial Trading Systems and indicators
    2. Raw Commercial Ideas
    3. Evaluate Commercial Ideas
  • Brokers
    1. Metatrader brokers
  • Programming
    1. MetaTrader Programming
    2. TradeStation Programming
  • Training
    1. Metatrader
      1. Metatrader 4 mql 4 - Development course
        1. Questions
        2. Lessons
    2. TradeStation

» Popular Tags

analysis best broker best ea BrainTrading breakeven broker camarilla chart code custom EA day trading ea coding ea ma ea zig zag ecn elliot EQUITY eurusd exit strategies

» Rankings

Hottest Threads

1  Eurusd/gbpusd
2  CatFx50
3  10points 3.mq4
4  FxOpen
5  Multi Timeframe Indicators

view more
 

Most Popular Threads

1  Multi Timeframe In...
2  CatFx50
3  Something interesting pl...
4  The Murrey Math Trading System
5  Show Us Your Best

view more

» FEATURED BROKERS



« Previous Thread | Next Thread »

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. EA Templates
    By xxDavidxSxx in forum Expert Advisors - Metatrader 4
    Replies: 23
    Last Post: 02-23-2012, 03:56 PM
  2. Templates to create EAs and Indicators
    By newdigital in forum Questions
    Replies: 29
    Last Post: 01-20-2012, 10:04 PM
  3. Lesson 18 - Working with templates
    By codersguru in forum Metatrader 4 mql 4 - Development course
    Replies: 13
    Last Post: 08-03-2008, 01:39 AM
  4. Profitunity Templates.......
    By Qbert006 in forum Indicators - Metatrader 4
    Replies: 2
    Last Post: 03-06-2006, 07:33 PM

Bookmarks

Bookmarks
  • Submit to Digg Digg
  • Submit to del.icio.us del.icio.us
  • Submit to Technorati Technorati
  • Submit to Furl Furl
  • Submit to StumbleUpon StumbleUpon
  • Submit to Reddit Reddit
  • Submit to Facebook Facebook
  • Submit to Blink List Blink List
  • Submit to Google Google
  • Submit to Yahoo My Web Yahoo My Web
  • Submit to Twitter Twitter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
  • BB code is On
  • Smilies are On
  • [IMG] code is On
  • [VIDEO] code is On
  • HTML code is Off
  • Trackbacks are On
  • Pingbacks are On
  • Refbacks are On

Forum Rules

Forums
  • Free sections
  • Exclusive sections
  • All sections
Calendar Social Networking
Premium Forum
  • Elite Membership
  • Advanced Membership
All times are GMT. The time now is 07:47 PM.
Terms and Conditions
PRIVACY POLICY
Powered by vBulletin® Version 4.1.11
Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.
Digital Point modules: Sphinx-based search

Subscribe today and get...

Elite Membership
  • Elite Trading Systems
  • Propietary Indicators
  • Private Performance Reports
  • Elite EAs Source Code
  • 24/5 Trading Support!
Advanced Membership
  • Elite benefits, plus:
  • - MT4 & MT5 cutting-edge indicators.
  • - Advanced propieatry indicators and its source codes.
  • - Free conversion of MT4 indicatiors to MT5.
View our best offer!