[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 298

 

Ale-xander Insert the right magician in the OrderSend() function

 

Can you tell me where I can download MT4 with five-digit quotes?

 
PAV:

Can you tell me where I can download an MT4 with five-digit quotes?

Any MT4 will do. You need a trading account with five digits :)


http://forexsystems.ru/obsuzhdenie-raboty-i-uslovii-brokerov/63007-dc-s-5-znakami.html

P.S.

When you switch in the terminal from four- to five-digit, change the timeframe on the chart - just click on the timeframes, so that the five-digit quotes are displayed.

 
PAV:

Can you tell me where I can download MT4 with five-digit quotes?


From a five digit DC. :-)
 
drknn:

http://forexsystems.ru/obsuzhdenie-raboty-i-uslovii-brokerov/63007-dc-s-5-znakami.html

Insert the required magik in the OrderSend() function

thanks, will try....This is beyond my abilities. If you can do it. Here's an EA for you.

https://www.mql5.com/ru/code/10773

 
Ale-xander:
Thank you for the quick answer. Then teach how to open your orders with a magic number.

You can set an order like this:

int MagicNumber=555;
OrderSend(Symbol(), OP_BUY, 1, Ask, 30, Bid-25*Point, Ask+25*Point, "My order", MagicNumber, 0, Green);

To close orders by magic number:

if (OrdersTotal()>0)
{  for (int i=OrdersTotal()-1; i>=0; i--)
   {  if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
      {  if (OrderMagicNumber()==MagicNumber) // Выбираются только те ордера, у которых заданный магик-номер.
         {  if (OrderType()==OP_BUY)
            {  RefreshRates();
               OrderClose(OrderTicket(),OrderLots(),Bid,30);
               return(0);
            }
            if (OrderType()==OP_SELL)
            {  RefreshRates();
               OrderClose(OrderTicket(),OrderLots(),Ask,30);
               return(0);
            }
}  }  }  }

Slipage 30 is for 5-digit quotes. Depending on type (pending order or open position) use appropriate parameters instead of OP_BUY and OP_SELL.

 
paladin80:

You can set an order like this:

To close orders by magic number:

Slipage 30 - for 5-digit quotes. Depending on the type (pending order or open position) use appropriate parameters instead of OP_BUY and OP_SELL.




as I thought it would, it didn't work. Gotta get into the meat of it.

Thank you

 
Ale-xander:

as I thought it would, it didn't work. Gotta get into the meat of it.

Thank you

Well yes this is only part of the code, just as an example of which direction to drill into the matter. Correct execution also depends on the environment where my example would have to work. Good luck to you.
 

Help if you can.

There's a problem with the tester.

Here is a piece of code.

   for (i   =  0; i  <  NumberBars;   i++)
   {
      Buf_EUR[i]              =  iOpen("EURUSD", Period(),   i);
      Buf_GBP[i]              =  iOpen("GBPUSD", Period(),   i);
   Print("");
   Print("EURUSD = ",         iOpen("EURUSD", Period(),  i),
         ", GBPUSD = ",       iOpen("GBPUSD", Period(),  i),
         " , i = ",  i); 
   }

I read the history of two pairs into the buffer. and then I print the result i=0.

This is what it looks like in the log.

10:21:53 2012.03.19 01:00 1P_Pair EURUSD,M1: EURUSD = 1.3177, GBPUSD = 1.5302, i = 232

10:21:53 2012.03.19 01:00 1P_Pair EURUSD,M1:

10:21:53 2012.03.19 01:00 1P_Pair EURUSD,M1: EURUSD = 1.3177, GBPUSD = 1.5309, i = 233

10:21:53 2012.03.19 01:00 1P_Pair EURUSD,M1:

10:21:53 2012.03.19 01:00 1P_Pair EURUSD,M1: EURUSD = 1.3175, GBPUSD = 1.531, i = 234

10:21:53 2012.03.19 01:00 1P_Pair EURUSD,M1:

10:21:53 2012.03.19 01:00 1P_Pair EURUSD,M1: EURUSD = 1.3174, GBPUSD = 1.5313, i = 235

10:21:54 2012.03.19 01:00 1P_Pair EURUSD,M1:, Time = 2012.03.19 01:00

10:21:54 2012.03.19 01:00 1P_Pair EURUSD,M1: EURUSD = 1.3175, GBP = 1.5833

What is read in the buffer has nothing to do with the final value. On EURUSD it's not so evident, while on GBPUSD it's visible to the naked eye.

The GBPUSD online and offline charts are the same.

I cannot understand.

I need your help.

 
people, is there a virtual dedicated server anywhere on the internet for free?
Reason: