Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1160

 
Artyom Trishkin:

You are probably better off writing in Python. Why do you need MQL as a C-like language? It has its own syntax, in python you are used to.

There were no such questions here.

 
Andrey Sokolov:

There were no such questions here.

There were answers in the style of your questions:

If you don't like the language, write in another one.

It's easier than trying to learn a language that doesn't suit you. And you don't know that it's going to work.

Really - I do not understand the urge not to learn the syntax, and stubbornly overcorrect as a habit.

It's like buying a jacket you don't need and turning it into slippers. What for? You could buy slippers straight away and not break the jacket. And the jacket would survive and the money would be safe.

 

Hello !

How do I know the Ask valuefor an instrument other thanthe current one ?

I want to open an order on an instrument other than the current one .

 
Yerkin Sagandykov:

Hello !

How do I know the Ask valuefor an instrument other thanthe current one ?

I want to open an order for an instrument other than the current one .

Something like this

  MqlTick Tick;
    SymbolInfoTick("symbol", Tick);

I have a structure with both Ask and Bid ...

struct MqlTick 
  { 
   datetime     time;          // Время последнего обновления цен 
   double       bid;           // Текущая цена Bid 
   double       ask;           // Текущая цена Ask 
   double       last;          // Текущая цена последней сделки (Last) 
   ulong        volume;        // Объем для текущей цены Last 
  };

I have more in mql5

struct MqlTick 
  { 
   datetime     time;          // Время последнего обновления цен 
   double       bid;           // Текущая цена Bid 
   double       ask;           // Текущая цена Ask 
   double       last;          // Текущая цена последней сделки (Last) 
   ulong        volume;        // Объем для текущей цены Last 
   long         time_msc;      // Время последнего обновления цен в миллисекундах 
   uint         flags;         // Флаги тиков 
   double       volume_real;   // Объем для текущей цены Last c повышенной точностью 
  };
 
Artyom Trishkin:

There were answers in the style of your questions:

If you don't like the language, write in another.

It's easier than trying to cripple a language that doesn't suit you. And it's not certain that you'll succeed.

Really - I do not understand the urge not to learn the syntax, and stubbornly overcorrect as a habit.

It's like buying a jacket you don't need and turning it into slippers. What for? You could buy slippers straight away and not break the jacket. And the jacket would survive and the money would be safe.

The question was quite specific and unambiguous, not "in style".

 
Alexey Viktorov:

Something like this

and from the structure and ask and bid and ...

and in mql5 even more

if only ask, i would use SimbolIndoDouble... somewhere in my subcortex it's written that it's cheaper to get one value than the whole structure... but there's no certainty that it's not taken from this structure :)

 
Igor Zakharov:

if only asc, I would use SimbolIndoDouble... Somewhere in my subcortex it's written that it's cheaper to get one value than the whole structure... but there is no certainty that it is not taken from this structure :)

Not cheaper, we discussed a similar or similar issue somewhere. I don't remember which developer said this, but they claimed there was no difference. And in general, the colours are different, but they all taste the same.
 
Alexey Viktorov:

Something like this

and from the structure and ask and bid and ...

and in mql5 even more

Thank you !

 
Help me find an EA or script for setting a trailing stop at a specified time, on an open position.
 
Hello! How do I change the font size in the terminal? Can someone give me a hint?
Reason: