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

 
alsu >> :

like this

Can I get signals on weekly candlesticks? It's just that the signals come on weekly candlesticks.

Or tell me how to get the extremums of the past week...

P.S.

Today is my first day mastering mql....

 
Obviously you have to use iHighest, but there are also holidays when the number of working days is less...
 
Gentlemen, who can make an indicator that shows the average value of the ZigZag beam in bars and pips ? And at the same time shows the value of the last (current) beam.
 
just-me >> :
Obviously you have to use iHighest, but there are also holidays when the number of working days is less...
double iHigh( NULL, PERIOD_W1, int shift)
double iLow ( NULL, PERIOD_W1, int shift) 
 
 

Ah, that makes sense, but I'm confused as to what's wrong with this code:

double max = iHigh("GBPUSD",PERIOD_W1,1);
double min = iLow("GBPUSD",PERIOD_W1,1);
bool trade_allowed;
    
if( trade_allowed==false)
{
 if(TimeDay(Time[0])-TimeDay(Time[1])>1)
 {
  trade_allowed=true;
 }
}

if( trade_allowed==true)
{
 if(Ask> max)
 {
  if(OrdersTotal()==0)
  {
   OrderSend("GBPUSD",OP_BUY,1,Ask,3,Bid-0.0103,Ask+0.0103,0,1,0,Green);
   trade_allowed=false;
  }
 }
 if(Bid< min)
 {
  if(OrdersTotal()==0)
  {
   OrderSend("GBPUSD",OP_SELL,1,Bid,3,Ask+0.0103,Bid-0.0103,0,1,0,Green);
   trade_allowed=false;
  }
 }
}




 
Dear traders, help me solve this problem. The question is how to make an automatic calculation of the indicator without having to click the compile button in MetaEditor every time. I have two indicators and the second indicator is connected with the first one through theiCustomfunction , but when I change the parameters of the first one, the second indicator won't be calculated until I press the compile button.
 

Alexander, the second indicator does not calculate taking into account the changes of the first indicator, because it has already triggered and calculated all the values when the first indicator has not yet been changed, when you press compile it stops working, it resets and starts it again, well, it just reloads.

So there is no need to recompile the second one, just delete it and reattach it to the financial tool.

 
Techno >> :

Alexander, the second indicator does not calculate taking into account the changes of the first indicator, because it has already triggered and calculated all the values when the first indicator has not yet been changed, when you press compile it stops working, it resets and starts it again, well, it just reloads.

So there is no need to recompile the second one, just delete it and reattach it to the financial tool.

Then I will describe the process a little more in detail. I change the datetime value (current date) in the first indicator in MetaEditor and press compile, it's ok, the first indicator is created and the second indicator makes a calculation using some parameters of the first indicator and displays a message using Comment (this is its main purpose), after compiling the first indicator, the second shows the result without taking into account changes of the first indicator, but when I compile the second indicator, everything works properly, until I need to change the datetime of the first indicator.

 
Rebooting instead of recompiling the indicator (the one that does everything completely by itself), didn't lead to anything?
 
Techno >> :
Rebooting instead of recompiling indicator (the one which does everything by itself) didn't lead to anything?

I either have to constantly delete and re-insert the indicator or compile it differently (automatically) but I can't do it. I've had some problems with indicator drawing; I've had to close MT and open it again, but if I'm connected to the Internet, the indicator (the first one) will be drawn; I used to have problems with other Inductors when I was creating them, they needed Internet connection or MT offloading.