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

 
Sova-kmv:

Good day to you all! Folks, well advise me if anyone knows.

This is the code you can use to get the current prices.

Question:

What is the right way to attach this to it?

Well, in order to get the current price in one EA for several currency pairs.

I'm not good at programming, that's why I'm trying to figure it out!

If you don't change your code too much, then :

If(SymbolInfoTick(Symbol(),last_tick))

write:if(SymbolInfoTick("GBPUSD",last_tick))


in quotes - the symbol name you want to read the current price of

 

Thanks a HUGEIgor, everything works.

Igor, could you please show me how to put two codes together correctly?

I really want to understand it.

 
Sova-kmv:

Thanks a HUGEIgor, everything works.

Igor, could you please show me how to paste the two codes together?

I really want to understand it.

You got the second code from help - it says there what parameters does SymbolInfoTick() take, I showed how you can display the values of current quotes in the log.

Your code does everything as described in the reference

 
Igor thanks, I just thought I had to use the second code (to select the pair) before using the second!
 

Igor, how do you put the information into the Tick variable ?

string Tick=Comment(last_tick.time,": Bid = ",last_tick.bid,
            " Ask = ",last_tick.ask,"  Volume = ",last_tick.volume);
void OnTick()
  {
   MqlTick last_tick;
if(SymbolInfoTick("EURUSD",last_tick))
     {
      Print(last_tick.time,": Bid = ",last_tick.bid,
            " Ask = ",last_tick.ask,"  Volume = ",last_tick.volume);
     }
   else 
      Print("SymbolInfoTick() failed, error = ",GetLastError());
}


 
Sova-kmv:

Igor, how do you put the information into the Tick variable ?


You don't need to create variables,

You already have everything in the last_tick variable.

 
mila.com:

Hello.

Is it possible to make the number of construction bars in the standard Fractals indicator customizable, i.e. different from 5?

If so, how can it be done?

Look in the codebase - on MT4 there were definitely...

 

Hello !

Can you please tell me how to create a full-fledged MT4 terminal in a copy of what has already been installed once in Windows 10 ? I am trying to create my second (third, fourth...) terminal for a month, but I have not got any further than a semi-working copy, even with the support of other traders on the forex-money forum... The tester in such copy does not want to work with visualization... Perhaps already worked such a problem, here would be a link there, or clarification ?

THANK YOU.

 
akarustam:

Hello !

Can you please tell me how to create a fully functional MT4 terminal in a copy of what has already been installed once in Windows 10 ? I am trying to create my second (third, fourth...) terminal for a month, but I haven't got any further than a semi-working copy, even with the support of other traders on the forex-money forum... The tester in such copy does not want to work with visualization... Perhaps already worked such a problem, here would be a link there, or clarification ?

THANK YOU.

Forum on trading, automated trading systems & strategy testing

New version of MetaTrader 4 build 1090

Alexey Viktorov, 2017.07.17 08:51

Send him two files from your mt4

1. terminal.exe

2. metaeditor.exe

Further actions

1. Create a directory at the desired location on the desired drive.

2. Put these 2 files there.

3. Create a shortcut to terminal.exe with the /portable switch if desired.

4. Run the terminal using the created shortcut and in the box. All necessary files and folders are created and all EAs, indicators and scripts are loaded.

5. Login to the account or register a new demo account.

ALL...


 
Hello. Can you tell me how to return the value of the penultimate order type in the order history.