Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 642

 
dr0:

And another question.

Is it normal that I cannot work with the indicator in Debug mode.

When the program reaches the stopping point, the MT4 terminal hangs and the window becomes white (in HP) so that it is impossible to see what is drawn on the chart


I haven't used debugging yet, so far I am doing without it. You must have a clear idea of what you want to do, how to do it, and then write! You have to learn how to debug, too! Study the Documentation, the Articles and the Forum's topics! Dig in!
 

Explain where I'm wrong, can't find the tool in Market Watch.

Print("Got pair ", GetPair("USDCHF")); // Вызов

string GetPair(string currency){
string smb="";
for(int i=SymbolsTotal(true)-1; i>0; i--){
   smb=SymbolName(i,true);
   string sm1=StringSubstr(smb,0,3),sm2=StringSubstr(smb,3,3);
   if(StringFind(currency,sm1,0)>0&&StringFind(currency,sm2,0)>0) break; else smb=" Not Found ";
 }
 return(smb);
}
 
Dear Professionals! Please advise where you can find information on how to attach a DLL file to the Expert Advisor, what program to use, in general, the more about it the better!
 

Close order by market when price moves below the Low of the previous candle

Hi all. Could you please tell me how to write this mechanism in mql4

Maybe somebody already has this code. Please upload

 
The previous candle is bar 1: Low(1)-Point*pips (as many as you want). For how to modify see. Documentation!
 
I don't know much about programming, but what are point & pips
 
borilunad:
The previous candle is bar 1: Low(1)-Point*pips (as many as you want). For how to modify see. Documentation!

I don't know much about programming, but what are point & pips
 
nogard37:

I don't know much about programming, but what are point & pips
The number of pips vertically.
 
vaniy:
Number of pips vertically.

Opening condition:


void CheckForOpen()
{
int res;
//--- go trading only for first tiks of new bar
if(Volume[0]>1) return;
//--- buy conditions
if(Close[1]<<Open[1]<Bar_HighOpen[1] && MathAbs(Close[1]-Open[1])<Bar_High)
{
res=OrderSend(Symbol(),OP_BUY,LotsOptimized(),Ask,3,0,0,",MAGICMA,0,Blue);
return;
}
//---
}

Where to insert the order modify&.

 

To insert code, please use the insert code button: Insert code correctly in the forum

As for your code: the modification should be done in a separate function. For example, name it

void ModifyOrders()
{

}
Reason: