I really want to learn MQL5 Where do I start ? - page 6

 
Grozir:

Search the internet for a book on MQL5. It may come in handy.

Advanced use of
MetaTrader 5 trading platform
© Timur Mashnin, 2016

Isn't there not enough information? Is there a book you should be looking for?
 

stop pulling the owl on the globe, masters of twisting .... If it does not work, there is no chorus, but let's recall C)))

C is a general-purpose language, MQL is a platform-dependent language, OOP is a methodology of writing a program, the same methodology as code-digging - do not like it, look for alternatives and prove that "My approach" (C) was justified by Pareto efficiency


SZS: Advice not to read literature, in my opinion silly - to broaden the mind has always been useful, but it seems the principle works here: "less you know, you sleep better! Literature has always been useful because it follows the methodology of teaching the material (from simple to complex), of course, that the method of scientific priming can also achieve fantastic results)))

 
for a complete study of the subject and reading books - there are Institutes, there are websites of computer scientists or whatever. i think a person wants to learn, simple functions that are used in Expert or Indicator.
 
Alexsandr San:
Isn't there enough information? Is there another book you should be looking for?

If you want to read it, you don't have to. It's purely voluntary.

This is not a school with a compulsory reading list for out-of-school holidays)))

 

my brain has worked out, after studying this program ( Forex Generator )- how this program created code and honours, reviewed its actions

Photo by


8 days license - it can be bypassed

Snapshot2

---------------------------------------------------

I tried to install it now, it was a dumb program. before, after I clicked the green button in the program, the code would appear in the metadvisor.

now nothin'.

-------------------------------------

i don't know if it's because i had mt4 before and now i'm trying it with mt5. but it worked with mt4 at the time

------------------------------------------------------------------------------------------------

it doesn't work - i already installed mt4 to check this stupid program

Photo by

-----------------------------------------------

it worked - I gave wrong path to the folder - But when you click, you need to quickly fetch temp.mq4 code, otherwise it will disappear

--- didn't disappear before 7 years ago

Snapshot2

-------------------------------------

this is what it created - and I was trying to figure out what went where before

//-------------------------------------------------------------
//  Etasoft Inc. Forex EA and Script Generator version 7.x   EA
//-------------------------------------------------------------
// Keywords: MT4, Forex EA builder, create EA, expert advisor developer

#property copyright "Copyright © 2014-2019, Etasoft Inc. Forex EA Generator v7.x"
#property link      "http://www.forexgenerator.com/"

#include <stdlib.mqh>
#include <WinUser32.mqh>

// exported variables
extern double BuyLots3 = 0.1;
extern int BuyStoploss3 = 20;
extern int BuyTakeprofit3 = 30;


// local variables
double PipValue=1;    // this variable is here to support 5-digit brokers
bool Terminated = false;
string LF = "\n";  // use this in custom or utility blocks where you need line feeds
int NDigits = 4;   // used mostly for NormalizeDouble in Flex type blocks
int ObjCount = 0;  // count of all objects created on the chart, allows creation of objects with unique names
int current = 0;   // current bar index, used by Cross Up, Cross Down and many other blocks
int varylots[101]; // used by Buy Order Varying, Sell Order Varying and similar



int init()
{
    NDigits = Digits;
    
    if (false) ObjectsDeleteAll();      // clear the chart
    
    
    Comment("");    // clear the chart
    return (0);
}

// Expert start
int start()
{
    if (Bars < 10)
    {
        Comment("Not enough bars");
        return (0);
    }
    if (Terminated == true)
    {
        Comment("EA Terminated.");
        return (0);
    }
    
    OnEveryTick1();
    return (0);
}

void OnEveryTick1()
{
    PipValue = 1;
    if (NDigits == 3 || NDigits == 5) PipValue = 10;
    
    IfHighestBar2();
    
}

void IfHighestBar2()
{
    if (iHighest(NULL, 0, MODE_HIGH, 10, current) == current)
    {
        BuyOrder3();
        
    }
}

void BuyOrder3()
{
    double SL = Ask - BuyStoploss3*PipValue*Point;
    if (BuyStoploss3 == 0) SL = 0;
    double TP = Ask + BuyTakeprofit3*PipValue*Point;
    if (BuyTakeprofit3 == 0) TP = 0;
    int ticket = -1;
    if (true)
    ticket = OrderSend(Symbol(), OP_BUY, BuyLots3, Ask, 4, 0, 0, "My Expert", 1, 0, Blue);
    else
    ticket = OrderSend(Symbol(), OP_BUY, BuyLots3, Ask, 4, SL, TP, "My Expert", 1, 0, Blue);
    if (ticket > -1)
    {
        if (true)
        {
            bool sel = OrderSelect(ticket, SELECT_BY_TICKET);
            bool ret = OrderModify(OrderTicket(), OrderOpenPrice(), SL, TP, 0, Blue);
            if (ret == false)
            Print("OrderModify() error - ", ErrorDescription(GetLastError()));
        }
            
    }
    else
    {
        Print("OrderSend() error - ", ErrorDescription(GetLastError()));
    }
}



int deinit()
{
    if (false) ObjectsDeleteAll();
    
    
    return (0);
}

Files:
temp1.mq4.mq5  6 kb
 
Georgiy Merts:

...

Personally, I don't see much difference at all - all my libraries are written so that with minimal reworking they can be used in C++.

This may mean that you don't fully use C features or mql capabilities.

 
Evgeniy Zhdan:

Maybe you should start with BASIC and gradually get to MQL5 via Pascal, Assembler, C+, C# and only then try to write Hello world with output on the chart in the comment.

Assembler is a must to learn. You won't succeed without it. :)
 
Serhii Dielieu:
Assembler is a must. You can't do without it. :)

If you want to get out of the sandbox, reading with a dictionary is highly desirable.)

 
Dmitry Fedoseev:

This could mean that you are not taking full advantage of the capabilities of C, nor of mql.

It's quite possible.

But I've repeatedly emphasized that the code must be simple and transparent "like three cents", and all sorts of tricks and "special features" must be used very carefully.

Using all sorts of "advanced features" and "tricks" has more than once cost me my life. Therefore, I always adhere to the principle "don't create new entities unnecessarily". If the problem can be solved acceptably by using standard, well-established methods - it should be solved in this way, without resorting to brand new methods. This principle has more than once saved me when new builds were released, when people on the forum would periodically howl that "they spoiled what worked before". But when you look at it you see that it has rather non-trivial code which you have to try to figure out... So why is it surprising that this code starts compiling with errors after making changes?

Of course, we should not go to the other extreme either and deny anything new at all. However, a "healthy conservatism" is very useful in my opinion.

 
muhhacc ccc:
Hi all. I want to learn MQL5 /
Can you guys help me where to start? Are there any tutorial videos?
I found some videos but I don't understand more than 80% of what they show how to write EAs by example ( example of various functions and so on ) I need some basics.
Thanks for understanding

You have to start at the end,

like:

- I have a profitable strategy, but I'm tired of sitting in front of the monitor all day, I need a robot to replace me,

- I'm not good at profitable trading, but as soon as I learn MQL, I will write a robot and it will start pumping money from the Internet,

))

I have no idea what to do with it, what's your goal?

Reason: