[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 1020

 
AlexSTAL:

Where do you want the pair? To metatrader???? In the market review "Symbols", if this DC does not have them, it is not possible to add

What does that have to do with it? You somehow have no idea what you want and how you want....

For you, I guess I could say this: DDE is designed with hyper-limited functionality ONLY for streaming online quotes. It does not work with history

The topic of previous questions and this one is DDE-Sample.xls and how it works. Alex told me how to make this file load quotes in real time.

Thanks to him. I want to ask: Is it possible to add another row with other currency pairs (AUDUSD and USDCAD) under the table on the first page and display them in real time?

Thanks in advance....

What about the idea of HOW TO TRANSFER QUOTES TO EKSEL?

 
igrok2008:

The subject of previous questions and this one is DDE-Sample.xls and how it works. AlexSTAL told me how to make this file load quotes in real time

Thanks to him. Can I add another row with other currency pairs (AUDUSD and USDCAD) under the table on the first page and display them in real time?

I told you - copy the line in excel and change the formula and you will have any instrument available in MT4.
 
if alex was paid 100 cents for every line of hints :) - then fuck off and work :)
 
Vinin:
Most people don't need that button
But there's so much text and insults and revelations... Boring... :)
 
pension:

To write the owl correctly, you lack knowledge of the operation of the entire terminal system.

Introduction. There is a main program. There are the subroutines-functions. There are operators. All operators are executed one by one, according to the algorithm. It is quite clear. It is an axiom.

Now. We have one copy of the owl in .mq4 and one copy in .ex4 accordingly. We drag this owl to different charts. Suppose we have two charts of the same pair with different TFs.

Question 1 Where are the program codes of the Owls stored then? In chart templates?

Question 2: Tick comes in. What is the sequence of execution of the Owls? If it is one (it probably is, and only the corresponding blocks of variable values are pinned to each chart, and the language interpreter only substitutes the values when unwinding) then which is the first, which is the second, etc. They can't unwind in parallel, can they ?

Maybe someone can point out where this is described in the literature. Probably missed, did not pay attention. Or maybe this question has already been considered.

Thank you all in advance for their response.

--I have owl in .mq4 and .ex4 format, respectively, one copy each.

Files of mq4 type are the source code of a program. Files of this type contain the source code of all types of programs (Expert Advisors, scripts and indicators).

The ex4 files are compiled programs ready for practical use in the client terminal.

-Where are the program codes of the Owls stored then? In the chart templates?

In ex4 files (i.e. compiled in a language the program understands) near the mq4 source.

--Tick comes in. What is the sequence of PSBs?

You can check it yourself by adding an alert ("Owl #1 Time = " + TimeToStr(TimeLocal(),TIME_DATE|TIME_SECONDS)) to the start of function;

into another alert("Owl #2 Time = " + TimeToStr(TimeLocal(),TIME_DATE|TIME_SECONDS));

 

Hello.

How is Close [ i ] called in a separate indicator window, but not the main tool, but the tool named name ?

#property indicator_separate_window

////////////////

MovingBuffer[i]=iMA(name,0,Period1,Shift,modeMA,PRICE_OPEN,i) ; // - calculation of moving average of the instrument name

NameBuffer[i]= Close [i ] ; // - wrong, because it will enter the instrument cloze in the main window...

/////////////////

 
Rossi:

Hello.

How is Close [ i ] called in a separate indicator window, but not the main tool, but the tool named name ?

#property indicator_separate_window

////////////////

MovingBuffer[i]=iMA(name,0,Period1,Shift,modeMA,PRICE_OPEN,i) ; // - calculation of moving average of the instrument name

NameBuffer[i]=Close [i ] ; // - wrong, because it will enter the instrument cloze in the main window...

/////////////////

MovingBuffer[i]=iMA(name,0,Period1,Shift,modeMA,PRICE_OPEN,iBarShift(name,0,Time[i],false)) ; // - вычисление скользящей средней инструмента name

NameBuffer[i]= iClose(name,0,iBarShift(name,0,Time[i],false)) ; // - неправильно, потому что введет клозе инструмента в основном окне...

READ

https://book.mql4.com/ru/functions/timeseries

 
costy_:

--The Tick comes in. What is the sequence of execution of the OWS?

You can check yourself by adding an alert("Owl #1 Time = " + TimeToStr(TimeLocal(),TIME_DATE|TIME_SECONDS)) to the start of the function;

into another alert("Owl #2 Time = " + TimeToStr(TimeLocal(),TIME_DATE|TIME_SECONDS));



too crude, I would use GetTickCount(), and reset some counter in all codas synchronously at the start of a new minute, and then log all messages
 

Here is a question. I have an Expert Advisor that opens and closes positions by itself. But when I open a position manually, the tester does not close the manually opened position when the signal to close comes. What might be the problem. The code is attached to close a position.

for(int i=0;i<OrdersTotal();i++)

{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break;
if(OrderMagicNumber()!=MAGICMA || OrderSymbol()!=Symbol()) continue;

if(OrderType()==OP_BUY)
{
if (Open[1]<Open[2])

OrderClose(OrderTicket(),OrderLots(),Bid,3,White);

break;
}


if(OrderType()==OP_SELL)

{

if (Open[1]>Open[2])

OrderClose(OrderTicket(),OrderLots(),Ask,3,White); 

break;
        }
       } 
    }
 
 
antoma2:

Here is a question. There is an Expert Advisor that opens and closes positions by itself. But when I open a position manually, the tester does not close the manually opened position when the signal to close comes. What might be the problem. The code is attached to close the position.

The OrderMagicNumber() function always returns 0 for manually opened positions. That is, the MAGICMA variable in the EA is not equal to 0.