[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 866

 

Oh my god!!! Again the error!!! I've been racking my brain for an hour and a half, reading the documentation, I can't figure it out

{ int AND=1,K ;while(Time <= K)

{ int C=I;
И++;
AND=C; }


K=Time[1]- Time[C];
int Difference=Close[1]-Close[C];

'K' - variable not defined C:\Metatrader\experts\Time of Dimon 2.mq4 (42, 10)

1 error, 0 warning
I declared it, all is well? I also tried to declare it datetime, the result is the same. What a bummer!!!

 
Dimka-novitsek:
Thank you!!! I'm such a jerk!!! I'm sorry!


And you want to be an eternal newbie.

Some immediately take the nickname Wisest, only the questions are the same. We are all growing, and the Wisest can become one. But a newcomer will still be a newcomer. Words about nothing, thoughts about words and nicknames.

 
Hi, sorry for going in the wrong direction. Can you tell me where I can find out about the Three Indians strategy?
 
sumotori:
Hi, sorry for going to the wrong place. Can you tell me where I can find out about the Three Indians strategy?
right here.
 
sergeev:
over here
fun, humour appreciated, thank you.
 

When a new bar appears, several indicators (each for its own currency pair; the timeframes of some currency pairs may be the same and others may differ) may simultaneously give the same sound signal. In practice, these audible signals do not overlap into one sound, but sound one after the other and this must be avoided somehow. Currencies are not

rigidly tied to one and the same timeframe

(i.e. now on one, then may be on the other)

.

For example:

There may be two pairs on 15 MIN timeframe, two other pairs on 60 MIN, another pair on 30 MIN.

So, the 15s will overlap with each other + they also overlap with 60 MIN, etc.

- Does anyone have an idea how to avoid overlaps and always sound just one beep?

Thanks!

 

Figured it out. By long experience.

datetime Y,B;
Q=Time[1];
Y=Time[C];
C=TIME[C]; C=TIME[C];


 

I can't figure out what the problem is. An error occurs when modifying and when searching for the error I came across an unclear phenomenon: the order type before modification and after is different. Or am I misunderstanding something or something is wrong in the code? The comment gives out "before 4 after 5".

//****************************** modify ОТЛОЖЕННЫХ ОРДЕРОВ ***********************************************
string typ;  
int i, k=OrdersTotal();
for(i=0; i<k; i++)
   {
    if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
       {
        if(OrderMagicNumber()==MagicNumber && OrderSymbol()==Symbol() && OrderType()>1 && OrderType()<6)
          {
           if(OrderType() == OP_BUYSTOP)
             {              
              typ=OrderType();              
              ModifyOrder(PriceBuy(), 0, 0, 0);
              Comment("Тип ордера ","до ",typ," после ",OrderType());               
             }
          }
       }
     else  {Print("OrderSelect() вернул ошибку - ",GetLastError());}
   }
 
khorosh:

I can't figure out what the problem is. An error occurs when modifying and when searching for the error I came across an unclear phenomenon: the order type before modification and after is different. Or am I misunderstanding something or something is wrong in the code? The comment shows "before 4 after 5".


The PriceBuy() function is most probably an obstacle. It also seems to select a position
 
Vinin:

The PriceBuy() function is more likely to get in the way. It also seems to select a position.

Thank you. Yes, it would take me a long time to find the reason. Unobvious to those inexperienced in mgl, but an instructive error.
Reason: