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

 
FAQ:

С++

return without brackets is used in many languages. in MKL return() is a function, with all its implications.


By the way, and in the standard package that comes with mt4 in Sample DLL for MQL4 so the return value is in brackets:

BOOL APIENTRY DllMain(HANDLE hModule,DWORD ul_reason_for_call,LPVOID lpReserved)
  {
//---
   switch(ul_reason_for_call)
     {
      case DLL_PROCESS_ATTACH:
      case DLL_THREAD_ATTACH:
      case DLL_THREAD_DETACH:
      case DLL_PROCESS_DETACH:
         break;
     }
//---
   return(TRUE);
  }
 
Help me deal with ExpertAdvisor. I think I did it right when I installed it, the smiley face is smiling, but it won't trade! What might be the problem?
 

Good day!

Can someone advise how to prescribe a limit on the number of recalculated bars, as the indicator hangs, when opening each new bar:

int start()                         
  {
   int i, Counted_bars;  
//--------------------------------------------------------------------
   CurrentPoint1 = 0;
   CurrentPoint2 = 0; 
   kVol1=MarketInfo(Symbol_1, MODE_TICKVALUE)/MarketInfo(Symbol_1, MODE_TICKSIZE);
   kVol2=MarketInfo(Symbol_2, MODE_TICKVALUE)/MarketInfo(Symbol_2, MODE_TICKSIZE);
   Counted_bars=IndicatorCounted(); 
   i=Bars-Counted_bars-1;           
   while(i>=0)                     
     {


Thanks in advance!

 

Help a beginner, I can write simple robots, but I can't understand how to write a grid of pending orders in them......... Please explain in plain language how to do it! )))))))) It's written in the mcu elu tutorial the same way as with simple orders.... i can't understand it in my head...

 

sometimes on the tester, after a number of normal trades, there is "slippage"... (pours on the spread) as seen in the screenshot. And this ALWAYS happens on huge candles, much bigger than normal... Such as June 19.... or July 3...

Could it be a tester glitch ? or a code glitch ? (although I'm sure in the code, because on previous trades it passes all prescribed stages...)

 
Krokus:

Good day!

Can someone advise how to prescribe a limit on the number of recalculated bars, as the indicator hangs, when opening each new bar:


Thanks in advance!




Well there is no end of cycle, that's why it stalls.
 

is there a mistake somewhere?

string T;

T=(TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES));

 ObjectCreate( "Trend", OBJ_TREND, 0, 'T', 1.3205, 'T', 1.3215);

 ObjectSet( "Trend", OBJPROP_RAY, 0); 
something is wrong with the timing....
 
lottamer:

is there a mistake somewhere?

something is wrong with the timing....


ObjectCreate( "Trend", OBJ_TREND, 0, TimeCurrent(), 1.3205, TimeCurrent()+ 3600, 1.3215);

 ObjectSet( "Trend", OBJPROP_RAY, 0); 
bool ObjectCreate(      string name, int type, int window, datetime time1, double price1, datetime time2=0, double price2=0, datetime time3=0, double price3=0)
the time is not string , it is datetime
 

I've heard phrases like this:

из dll ты не можешь запросить предопределеный переменные

you can only pass normal variables in there.

you can't call orders total there (in the dll).

Is it true, or everything can be passed there and from there? I don't think it's logical.

 
hoz: I have heard such phrases here:

you can't query predefined variables fromthe dll.

you can only pass normal variables there

you can't call orders total there (in the dll).

Is that correct, or can everything be passed in and out? I don't think it's logical.


Close[]] in loop from Bars-1 to 0, then you can pass this array to dll and work with it there. I haven't tried it yet, but will have to.
Reason: