Errors, bugs, questions - page 3142

 
avralkosmos #:
Hello, guys, could you please advise me? I feel like I am dealing with some kind of weird calculations in MT5. I do not know how to use it. I do not know how to use it. Because of this, the risk manager just works ***. The broker is an opener. Section futures market. On the themes do not have time to browse. Throw the link if there is such a question already. I have no time for that. Thank you!

This is a known problem. MT5 can't handle FORTS properly, MQ thinks it's normal.

So only to tolerate or not to use.

By the way, hence the practical impossibility to use Signals on FORTS.

 
JRandomTrader #:

This is a known problem. MT5 can't handle FORTS properly, MQ thinks it's normal.

So only to tolerate or not to use.

By the way, hence the practical impossibility to use Signals on FORTS.

I got out of this problem by creating my own price structure and analysis of equities on the instrument. Now I do not pay attention to this problem. Plus there is an opportunity to control the broker.

 
Thank you! Well, the broker doesn't seem to be screwing up. Again, thank you!
 
Andrey Sokolov #:

There's a typo.


Thank you, it's corrected.

 
x572intraday #:

As far as I understand, all L0X in enum LIST {} are independent. However, as soon as we assign the same value (666) to some enum elements, the default comment stops displaying correctly, picking up comment (and apparently value, although it's hard to say, as they are the same and impossible to understand) from the first element with the same value (see last three linesin enum LIST {}) for some reason.

Worse, when trying to change the default display of line 7 from "ITEM 6" to "ITEM 7" and line 8 to "ITEM 8" in Program Settings, whichwere originally in the code comments, they are persistently knocked back to"ITEM 6":

Enum (otherwise a named constant) in the internal representation is just an int number

The name is chosen by value, and the first matching name for 666 is LO6

No plans to fix this behaviour.

 
Ilyas #:

An enum (otherwise named constant) in the internal representation is just an int number

The name is chosen by value, and the first matching name for 666 is LO6.

No plans to fix this behaviour.

Can I be more specific? The name is chosen by searching through an array of values? What's the first match?

 
Good day to all! When several timeframes are used in the Expert Advisor, we also see several charts when testing in visual mode. Is there any way to do the same, but not with different timeframes of one symbol, but with different symbols? My Expert Advisor runs on a chart of a custom symbol, but at the same time I would like to see what is happening on other symbols (which make up the custom one) at that moment.
 
SuhanovDM94 #:
Good day to you all! When several timeframes are used in an Expert Advisor, we also see several charts when testing in visual mode. Is there any way to do the same, but not with different timeframes of one symbol, but with different symbols? My Expert Advisor runs on a chart of a custom symbol, but at the same time I would like to see what is happening on other symbols (which make up the custom one) at that moment.

In OnInit(), ask for the bar time or what price and you will be presented with a chart of the symbol.

 
Alexey Viktorov #:

In OnInit(), ask for the bar time or what price and you will be presented with the symbol chart.

Now that's great! It's working, thanks a lot)

 
Hi, is the PositionSelectByTicket line required in the code... If so, how to correctly write a ticket inside it, through PositionGetTicket(i) or leavePositionGetInteger(POSITION_TICKET) ? Thanks in advance!
#define  EXPERT_MAGIC 261                // MagicNumber эксперта
input string    Symbol_T  = "XAUUSD";   // глобальная переменная для задаваемого символа

......

void OnTick()
{
   ......

   //Проверка наличия открытой позиции, чтобы не пытаться открыть ее заново
   bool   BuyOpened   = false;  
   bool   SellOpened  = false;
   for(int i = PositionsTotal()-1; i >= 0; i--)
   {
      if(PositionGetTicket(i) > 0 && PositionGetString(POSITION_SYMBOL) == Symbol_T && PositionGetInteger(POSITION_MAGIC) == EXPERT_MAGIC)
      {      
         if(PositionSelectByTicket(PositionGetInteger(POSITION_TICKET)) == true) 
         {
            if((ENUM_POSITION_TYPE)PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY)
            {
               BuyOpened = true;
            }     
            else if((ENUM_POSITION_TYPE)PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_SELL)
            {
               SellOpened = true;
            }
         }
      }
   }

   ......... 
}