Questions from Beginners MQL5 MT5 MetaTrader 5 - page 500

 
new-rena:
click
Thank you!
 
Alexey Volchanskiy:

The file name should be quoted without an extension. It's strange that it compiled at all. What was the originalZigZag variable?

I thought it was by itself.)
 

Hi all!

Can you tell me what and where to add in the code, so that the indicator is updated on every tick?

I have the following situation: when I install the indicator, it works, but it does not draw arrows. I update the chart after some time, arrows appear. I have to make them appear at the time corresponding to the parameters.

THE DECOMPILED CODE HAS BEEN REMOVED.

 
Help me to beat this Expert Advisor, it works, but I can not make it work.
MQL Code:
void OnTick() { datetime EaStartTime = StringToTime(StartTime); // EA start time datetime EaEndTime = StringToTime(EndTime); // EA end time datetime CurrTime = TimeCurrent(); // this is if you need to take terminal time if(CurrTime<< CurrTime>=EaEndTime return; // if it is not time to trade - exitEaStartTime || CurrTime>=EaEndTime) return; // if it is not time to trade - exit{ MacdCurrent=iMACD(NULL,0,InpFastEMA,InpSlowEMA,InpSignalSMA,Macd_Applied_Price,MODE_MAIN,0);
      SignalCurrent=iMACD(NULL,0,InpFastEMA,InpSlowEMA,InpSignalSMA,Macd_Applied_Price,MODE_SIGNAL,0);
      SignalMAPrevious=iMA(NULL,0,InpMAPeriod,InpMAShift,InpMAMethod,MA_Applied_Price,1); SignalMAThis=iMA(NULL,0,InpMAPeriod,InpMAShift,InpMAMethod,MA_Applied_Price,0);
      SignalParabolic=iSAR(NULL, 0,InpSARStep,InpSARMaximum,0); ZZThis=iCustom(NULL,0,"ZigZag",InpDepth,InpDeviation,InpBackstep,0, 0); ZZPrevious=iCustom(NULL,0,"ZigZag",InpDepth,InpBackstep,3);
     if(CountTrades()==0) CheckForOpen(); } }//+------------------------------------------------------------------+//|//+------------------------------------------------------------------+void CheckForOpen() {//-----Set buy order.
  if(SignalCurrent<MacdCurrent && SignalMAPrevious<SignalMAThis && Ask>SignalParabolic&& ZZThis>ZZPrevious) { ticket=OrderSend(NULL,OP_BUY,Lots,Ask, slippage,0,0,"15",magic,0,Blue); if(ticket>0) return; }//-----Set sell order.
  if(SignalCurrent>MacdCurrent && SignalMAPrevious>SignalMAThis && Bid<SignalParabolic&& ZZThis<ZZZPrevious) { ticket=OrderSend(NULL,OP_SELL,Lots,Bid, slippage,0,0,"15",magic,0,Red);
     if(ticket>0) return; } }// //+------------------------------------------------------------------+int CountTrades() { int count=0; for(int i=OrdersTotal()-1;i>=0;i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) { if(OrderSymbol()==Symbol()&& OrderMagicNumber()==magic) count++; } return(count); }//+------------------------------------------------------------------+double ModLots() { double lot; for(int i=OrdersHistoryTotal()-1;i>=0;i--) { if(!OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)) continue; if((OrderMagicNumber()==magic) &&(OrderSymbol()==Symbol())) { if(OrderProfit()< 0) {lot=OrderLots()*LotMarti; break;} else { lot=Lots; break;} } return(0); }
What's wrong with it????
 
Nickolay72:
Help me beat this EA, it works, but I can not make the martingale EA work, I've done many things.
MQL Code:
What's wrong with it????
Something did not see a quick glance where you use the function ModLots () to calculate the lot to open a position.
 
Сергей Криушин:

Hooray it's working, only now sometimes 2 minuses slip through, but it's nothing...))

What is the profit per trade in pips?
 

I bought an EA. Can you tell me how to check if this EA sends operation reports to the developer?

What operator should I look for in the EA code?

 
River:

I bought an EA. Can you tell me how to check if this EA sends operation reports to the developer?

What operator should I look for in the EA's code?

Search the code for the presence of dll calls.

 
River:

I bought an EA. Can you tell me how to check if this EA sends operation reports to the developer?

What operator should I look for in the EA code?

If you bought the EA in the Market or if the purchased EA does not use third-party dlls and is written in pure MQL, the only possibility to send the information to the developer is using the WebRequest function. To use it, you should allow the EA to access certain sites. Check whether the Expert Advisor you have bought has this permission. If it is, to which site it points. If it is to the developer's site, the possibility of information leakage is not excluded.
 
As far as I know the marketplace does not allow the sale of EAs that use DLLs
Reason: