+ Reply to Thread
Page 4 of 9 FirstFirst ... 2 3 4 5 6 ... LastLast
Results 31 to 40 of 90

Thread: Convert MT4 to MT5

  1. #60
    Junior Member jamshed2880 is on a distinguished road jamshed2880's Avatar
    Join Date
    Feb 2018
    Location
    sadiq abad
    Posts
    18
    Thanks
    78
    Thanked 30 Times in 12 Posts
    SubscribeSubscribe
    subscribed 0
    MT4 and MT5 is very provencial indicators.MT4 working in lover lavel and MT5 working is high lavel.MT4 working is very simple because MT4 indicator is very easy...

    Though trading on financial markets involves high risk, it can still generate extra income in case you apply the right approach. By choosing a reliable broker such as InstaForex you get access to the international financial markets and open your way towards financial independence. You can sign up here.


  2. The Following User Says Thank You to jamshed2880 For This Useful Post:

    amir2880 (2018-03-21)

  3. #59
    Banned sakigbest has a reputation beyond repute sakigbest has a reputation beyond repute sakigbest has a reputation beyond repute sakigbest has a reputation beyond repute sakigbest has a reputation beyond repute sakigbest has a reputation beyond repute sakigbest has a reputation beyond repute sakigbest has a reputation beyond repute sakigbest has a reputation beyond repute sakigbest has a reputation beyond repute sakigbest has a reputation beyond repute sakigbest's Avatar
    Join Date
    Mar 2018
    Location
    Punjab
    Posts
    9,065
    Thanks
    17,563
    Thanked 16,928 Times in 5,537 Posts
    MT4 ko mt5 ma change krna bohat muskil hai kubn k ya aam bnda ko iss kabaray ma zayada malumat nhi hoti orr bnda iss ko asani sa change nhi krsakta is kio iss k baray ma malumat e nhi ho gi too wo iss ko kasay change kray ga

    Though trading on financial markets involves high risk, it can still generate extra income in case you apply the right approach. By choosing a reliable broker such as InstaForex you get access to the international financial markets and open your way towards financial independence. You can sign up here.


  4. #58
    Member ch tayyab will become famous soon enough ch tayyab will become famous soon enough ch tayyab's Avatar
    Join Date
    Mar 2018
    Posts
    302
    Thanks
    0
    Thanked 146 Times in 108 Posts
    SubscribeSubscribe
    subscribed 0
    I used Job service few times and it was cheap by money (for me) and reliable. The only problem is the following: every coder is having his own specialization which came from public experience. I mean: one coder is good to code EA, and other coder is good to code oscillators and so on. So, it may be good to know "who is who" for example

    Because if some coder will tell you that all programming languages are same for him and he can code anything for everybody so ... may be - you will try to select the other coder ... or you can try to indentify their specializations by yourself looking at their activity on the forum and on their 'Job done' in Job service

    Though trading on financial markets involves high risk, it can still generate extra income in case you apply the right approach. By choosing a reliable broker such as InstaForex you get access to the international financial markets and open your way towards financial independence. You can sign up here.


  5. #57
    Junior Member Iqra18 is on a distinguished road Iqra18's Avatar
    Join Date
    Jan 2018
    Posts
    23
    Thanks
    4
    Thanked 13 Times in 7 Posts
    Open the source file MQL4\Experts\Moving Average.mq4 in MetaEditor 4 and select and copy all text (Ctrl + A, Ctrl + C). You can open the MetaEditor 4 by pressing the F4 key when the MT4 client terminal is open.
    2.It is assumed that you have downloaded the MT5 desktop terminal from your preferred broker. Open the instance of the MT5 client and open MetaEditor 5 to create a new EA (template).




    3.Assign a name to your EA template by filling the Name field. For example, you can use the name SimpleEA or simply name the file with something else. See the snapshot below:



    After completing this action, you will get the template for your future EA to be built on MT5.
    4.Select all text (Ctrl + A) on the template and delete them all, then paste (Ctrl + V) recently copied text from MetaTrader 4 as shown in the image below:



    You will get something like what is shown in the snapshot below:



    MetaTrader 5 has other orders system (select, send, open, close) methods, but in order to use the simplest method of conversion from MT4 to MT5 EA, it is better to use one library mq4.mqh. This library allows the programmer or user to work with the orders in MQL5 (such as the MT5-hedge) in the same way as in the MQL4. In other words, the library enables the order language system (OLS) to become identical to MQL4.

    This library covers only the order systems. The mq4.mqh library file is available from selected programmers online. The one used in this example has been obtained from a programmer and a little functionality added, and all these have been combined into a single file.
    5.Make sure an instance of the MT5 platform is open. Once you have your MT5 platform open, you can then click on File -> Open data folder \MQL5\Include and drop the library file (mq4.mqh) file to the folder.




    6.Refresh the MT5 platform by closing it and opening it again, then open MetaEditor5. Open the source code of the expert advisor and in the source code of SimpleEA.mq5 add the string: #include <mq4.mqh>


    7.Once you have added the string to the source code, you can compile the updated source code of SimpleEA.mq5 by just pressing the F7 button, or you can press the button which says Compile on the ToolBar of the MetaEditor 5:



    You will get only 2 errors after compilation:



    This also highlights another difference between the MT4 and MT5 platforms, and that is the differences in the indicators calls.
    In MetaEditor 4, you just write iMA(symbol,timeframe,settings ma, shift), where shift is a number of a price candle, example 0, last candle on the chart and iMA() is the return value of moving average on 0-candle.
    On MetaEditor5 you need to create handles for each indicator or EA and functions for getting value from the EA or indicator by this handle.

    Changing the MT4 Source Code to a Workable MT5 Version: Step-by-step Guide

    This brief section explains what you need to add the source code for MT4 to make it work in MT5. These changes apply only to the indicator. In other words, you need to change only one line in the source code.

    Change from:

    ma=iMA(NULL,0,MovingPeriod,MovingShift,MODE_SMA,PR ICE_CLOSE,0);

    to:

    int OnInit()
    {
    MAHandle = iMA(NULL, 0, MovingPeriod, MovingShift, MODE_SMA, PRICE_CLOSE);
    if(MAHandle == INVALID_HANDLE)
    {
    Print(Error creating MA indicator).

    The steps in conducting these changes are now described below:
    1.To begin, you have to create a variable Integer (int) type for MA-indicator handle and assign it a value known as INVALID_HANDLE. This is demonstrated below:

    int MAHandle = INVALID_HANDLE;



    Expert advisors and indicators have an OnInit() section for initializations in runtime. It has the form:

    int OnInit()
    {
    // your code here
    return(INIT_SUCCEEDED);
    }

    You can read about this using the Help File. The Help File on MetaEditor5 is accessed by pressing the F1 key. The MQL5 Community website also has a document which shows a lot of information that can be found in the Help File. This document can be accessed using this link:

    https://www.mql5.com/en/docs/basis/function/events
    2.The next step is to add this code into the text (that is, the source code) of our EA, if this section does not exist (press Alt + M from MetaEditor 5).



    In the list of functions, we can see that there are 5 functions. However, the OnInit() function doesnt exist by default, therefore we have to create it by ourselves by writing it manually. This is shown in the image below.



    You can press (Alt + M) on your computer keyboard so you can see the OnInit() function added to the source code.


    3.In section OnInit(), you can write the following code:

    MAHandle = iMA(NULL, 0, MovingPeriod, MovingShift, MODE_SMA, PRICE_CLOSE);
    if(MAHandle == INVALID_HANDLE)
    {
    Print(Error creating MA indicator);
    return (INIT_FAILED);
    }



    Usually, in the MT4 MetaEditor, you would be required to write the code like this:



    However, for the MT5, the code is written as a handle for an indicator. Therefore in MT5, you write the code as follows:


    4.In the next step, you will need to write a function to get value from Moving Average EA by using the handle shown in the image below:



    We mentioned earlier that you need to create a function for getting value for the indicator or EA when using the MetaEditor5. The Function for getting values contains a string known as CopyBuffer(). The CopyBuffer copies data from indicator to your array. CopyBuffer gets data of a specified buffer of a certain indicator in the necessary quantity. You can get more information about CopyBuffer by reading the document available on this link:

    https://www.mql5.com/en/docs/series/copybuffer

    The code is written below as follows:

    CopyBuffer( indicator_handle
    [in] The indicator handle, returned by the corresponding indicator function.
    buffer_num
    [in] The indicator buffer number.
    start_pos
    [in] The position of the first element to copy.
    count
    [in] Data count to copy.
    buffer[]
    [out] Array of double type.
    )

    MA has 1 buffer which is numbered 0. You need to copy one value from MA.

    In the MT4 MetaEditor, this is written as follows:



    The last 0 corresponds to the value of MA on the zero candle (the last candle on the chart).

    In the MT5 MetaEditor, this is written as follows:



    Copy one value, from index position to the MA array
    5.We now move to clear the 2 errors initially shown when compiling the code. You start this process by double clicking on the first record error as shown in the image below.



    ..and you will be moved to where the error is located in the MT5 source code for your EA. The error code is located on line 114 for this example. See image below:



    The line in the source code which contains this error has to be deleted and replaced with a string that contains the MaGet(0) code. This is illustrated in the image below. Notice that the error code is underlined in red ink, and the ma MaGet(0) code which is used to replace it is shown underneath.



    Once you have replaced the error code with the MaGet(0) string, you can compile the code once more by pressing the F7 key. When the source code is recompiled, we see that only one error remains as shown below:



    In order to replace the remaining error code, we go through the same sequence we used in clearing the first error code. Double click on the line containing the error code (i.e. on line 140 for this example), comment and replace as shown in the image below.



    Again, the error code is underlined with green ink, and the string under it shows the code to be used to replace it and effect the correction of the error.



    The string used for this replacement is:

    if (Open[1]>MAGet(0) && Close[1]<MAGet(0)

    Once you have commented and replaced the error code, you have to recompile the code. So once more, you compile the source code by pressing the F7 key on your computer keyboard to do this. You can see then that all errors have been taken care of. Zero errors in the code, as shown in the image below:



    This snapshot below shows the difference between the MT4 and MT5 source codes for indicator calls and the conversion process from MT4 to MT5.

    Though trading on financial markets involves high risk, it can still generate extra income in case you apply the right approach. By choosing a reliable broker such as InstaForex you get access to the international financial markets and open your way towards financial independence. You can sign up here.


  6. The Following User Says Thank You to Iqra18 For This Useful Post:

    amir2880 (2018-03-21)

  7. #56
    Junior Member BoogeY 992 is on a distinguished road BoogeY 992's Avatar
    Join Date
    Jan 2018
    Posts
    20
    Thanks
    12
    Thanked 19 Times in 8 Posts
    SubscribeSubscribe
    subscribed 0
    The GBPUSD pair spent most of the month of December in a tight range as the prices consolidated between 1.3200 and 1.3500 for much of the month.

    Though trading on financial markets involves high risk, it can still generate extra income in case you apply the right approach. By choosing a reliable broker such as InstaForex you get access to the international financial markets and open your way towards financial independence. You can sign up here.


  8. The Following User Says Thank You to BoogeY 992 For This Useful Post:

    amir2880 (2018-03-21)

  9. #55
    Junior Member BoogeY 992 is on a distinguished road BoogeY 992's Avatar
    Join Date
    Jan 2018
    Posts
    20
    Thanks
    12
    Thanked 19 Times in 8 Posts
    SubscribeSubscribe
    subscribed 0
    The global economy is expected to be driven by higher commodity prices which should support commodity currencies such as the Australian, New Zealand and Canadian Dollars. Additionally, an expected outflow of capital from the U.S. is likely to weigh on the U.S. Dollar. In other words, the strengthening of the global economy should limit the U.S. Dollar's gains and eventually drive it lower.

    Though trading on financial markets involves high risk, it can still generate extra income in case you apply the right approach. By choosing a reliable broker such as InstaForex you get access to the international financial markets and open your way towards financial independence. You can sign up here.


  10. The Following User Says Thank You to BoogeY 992 For This Useful Post:

    amir2880 (2018-03-21)

  11. #54
    Banned rehanayaz2 has a reputation beyond repute rehanayaz2 has a reputation beyond repute rehanayaz2 has a reputation beyond repute rehanayaz2 has a reputation beyond repute rehanayaz2 has a reputation beyond repute rehanayaz2 has a reputation beyond repute rehanayaz2 has a reputation beyond repute rehanayaz2 has a reputation beyond repute rehanayaz2 has a reputation beyond repute rehanayaz2 has a reputation beyond repute rehanayaz2 has a reputation beyond repute rehanayaz2's Avatar
    Join Date
    Dec 2017
    Posts
    813
    Thanks
    6,521
    Thanked 7,228 Times in 751 Posts
    Jee bilkul Mere Khayal Se Forex trading Mein Yeh mql software jo hai bilkul metatrader 4 on metatrader 5 Ki Tarah hai aur aap ko PC me install Karke integrator use kar sakte hain Yeh Bhi aapko integrate karta hai

    Though trading on financial markets involves high risk, it can still generate extra income in case you apply the right approach. By choosing a reliable broker such as InstaForex you get access to the international financial markets and open your way towards financial independence. You can sign up here.


  12. The Following 5 Users Say Thank You to rehanayaz2 For This Useful Post:

    amir2880 (2018-03-21), fxearner (2017-12-27), jimmy17 (2018-01-22), Nirzana (2018-01-22), yulbang111 (2018-01-22)

  13. #53
    Senior Member rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz's Avatar
    Join Date
    Sep 2017
    Location
    multan punjab pakitan
    Posts
    2,202
    Thanks
    14,428
    Thanked 13,190 Times in 2,040 Posts
    SubscribeSubscribe
    subscribed 0
    Sarji Mere Khayal Se Forex trading Mein metatrader 4 all metatrader 5 sem Hai To Mai Ye kahunga ke agar aap metatrader 5 ko Choos karte hain toh Wo bhi bilkul same hai metatrader 4 Ki Tarah aur usne aapko Ye dekhna Hoga Ki integrated kaise hain Humko select Kya Kiya Jata Hai Mera experience Hai Ke
    if this is helpful for you
    please klik THANKS for my post

  14. The Following 8 Users Say Thank You to rehanayaz For This Useful Post:

    amir2880 (2018-03-21), ayazfx (2017-12-17), danish555 (2017-12-16), FOREXMAN (2017-12-19), fxearner (2017-12-13), India148 (2017-12-16), jellybelly2017 (2017-12-16), KASINA (2017-12-24)

  15. #52
    Member mido83 will become famous soon enough mido83's Avatar
    Join Date
    Oct 2017
    Posts
    337
    Thanks
    23
    Thanked 79 Times in 59 Posts
    SubscribeSubscribe
    subscribed 0
    Much thanks to you for your accommodating written work , I didn't know before your tone , despite the fact that I am not master on PC but rather I am attempting to heard to know more . As a matter of fact this marker is helpfull for me, completely its style is better other pointer.

    Though trading on financial markets involves high risk, it can still generate extra income in case you apply the right approach. By choosing a reliable broker such as InstaForex you get access to the international financial markets and open your way towards financial independence. You can sign up here.


  16. The Following User Says Thank You to mido83 For This Useful Post:

    amir2880 (2018-03-21)

  17. #51
    Senior Member rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz has a reputation beyond repute rehanayaz's Avatar
    Join Date
    Sep 2017
    Location
    multan punjab pakitan
    Posts
    2,202
    Thanks
    14,428
    Thanked 13,190 Times in 2,040 Posts
    SubscribeSubscribe
    subscribed 0
    yes sir apne theek kehra hy hain forex ye is mt4 or mt 5 k bina achi treding krna mushkil ha bulky na mumken ha ye kaho ga k me ne to mt4 achi tarah ues kia ha or mt 5 ko bilkul ues ni kia ha mujy koi tajerba ni kia ha
    if this is helpful for you
    please klik THANKS for my post

  18. The Following 12 Users Say Thank You to rehanayaz For This Useful Post:

    Abniali05 (2017-10-26), Aliakbar2016 (2017-10-28), amir2880 (2018-03-21), billyboy00007 (2017-10-26), FOREXMAN (2017-10-27), ghaffar500 (2017-10-26), incomejobs (2017-10-26), jellybelly2017 (2017-10-29), munibkhan (2017-10-27), sufiyan22 (2017-10-29), yulbang111 (2017-10-26), zahid2016 (2017-10-28)

+ Reply to Thread
Page 4 of 9 FirstFirst ... 2 3 4 5 6 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Currently Active UsersCurrently Active Users

There are currently users online. members and guests

Forex Forum India | Forex Community Place Statistics Forex Forum India Statistics

Most users ever online was .

Welcome to our newest member,

Threads:

Posts:

Member: