Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 228

 
writing and testing on a tetbook, maybe not enough power?
 
or is the expert eating up a lot of RAM, what do you suggest?
 
petrov:

1.I need a balance at a point in time. The moment is set as a shift by a given interval relative to the current moment.

But it plummets when my Expert Advisor has a sharp and prolonged movement to the losing side.

I have been working on this project for over a year and I'm happy to buy an EA, I don't think I need it, I just need to contact them directly.

There was no contact with freelancers at all! They do not post and that's it. I'm thinking about communicating directly with them via contacts from the old request in April.

I have been in correspondence with Service Desk for three days now, but they are silent. I do not know what to do with them.


The problem may be solved. The only problem is that you may not like the solution. It is not my fault though. It's going to cost you.
 
FOTOGRAF14:
Hello! Please tell me if I run the Expert Advisor in the tester, it works. I change the external parameters and run it again, it does not work. I clean the platform with a special program, loading catheters, it works!

How does it stop working, see how much free space is left on the drive...
 
petrov:

1.I need a balance at a point in time. The moment is set as a shift by a given interval relative to the current moment.

But it plummets when my Expert Advisor has a sharp and prolonged movement to the losing side.

I have a very large amount of orders and entry conditions, not scalper and not a pipsitter. The idea is that if something serious happens, it will just record the loss and stop the work on the difference between the current and old balance, then I myself will deal with the situation.

There was no contact with freelancers at all! They do not post and that's it. I'm thinking of communicating with them directly through contacts for the old request in April.

I have been in correspondence with Service Desk for three days now, but they are silent. I do not know what to do with them.

Better to consider means=balance+profit instead of balance. For calculation of past funds it is easier to consider a given number of orders, although it may be done by date. In addition to that, I pass the allowable percentage of losses to the function. This is approximately like this - messages should be read from the bottom to the top:


 

Hello all, please help with a piece of code to sort out ripped from an indicator PivotsDaily v2.mq4 how to convert it to an hour or half-hour, only in one way or another, so it would be clearer changes, please help, thank you in advance

   if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
//   if(counted_bars>0) counted_bars--;
   limit=(Bars-counted_bars)-1;



for (i=limit; i>=0;i--)
{ 

if (TimeDayOfWeek(Time[i]) != 0)
{
 if (High[i+1]>LastHigh) LastHigh=High[i+1];
 if (Low[i+1]<LastLow)   LastLow=Low[i+1];
}

if (
    TimeDay(Time[i])!=TimeDay(Time[i+1]) && TimeDayOfWeek(Time[i])!=0
   )
   {
   P=(LastHigh+LastLow+Close[i+1])/3;
   R1 = (2*P)-LastLow;
   S1 = (2*P)-LastHigh;
   R2 = P+(LastHigh - LastLow);
   S2 = P-(LastHigh - LastLow);
   R3 = (2*P)+(LastHigh-(2*LastLow));
   S3 = (2*P)-((2* LastHigh)-LastLow); 
   LastLow=Open[i]; LastHigh=Open[i];
 
An interesting question has arisen. By standard, the iMACD indicator in the Expert Advisor works on the SimpleMA signal line. How can I make an EA read the indicator data from the ExponentialMA line? I can just make an indicator, but I cannot figure out the base in my EA. Who has faced with this? Any solution to the problem?
 
Rustam Bikbulatov:
An interesting question has arisen. The iMACD indicator in the Expert Advisor works by the SimpleMA signal line as standard. How can I make my Expert Advisor to read the indicator data from the ExponentialMA line? I can just make an indicator, but I cannot figure out the base in my EA. Who has faced with this? Any solution to the problem?

The standard iMACD just calculates by EMA: MODE_EMA = 1 = Exponential Averaging. This is most efficient!!!


      ExtMacdBuffer[i]=iMA(NULL,0,InpFastEMA,0,MODE_EMA,PRICE_CLOSE,i)-
                    iMA(NULL,0,InpSlowEMA,0,MODE_EMA,PRICE_CLOSE,i);
If your Expert Advisor has the MODE_SMA or MODE_SSMA parameter, replace it with MODE_EMA. The question is of little interest, there are no problems...
 
STARIJ:

The standard iMACD just calculates by EMA: MODE_EMA = 1 = Exponential Averaging. This is most efficient!!!


If your Expert Advisor has MODE_SMA or MODE_SSMA, replace it with MODE_EMA. The question is of little interest, there are no problems.

The question was how to do it in an Expert Advisor that calculatesthe signal line fromMODE_SMA in the standardiMACD.I can make the indicator myself. Although, it suggested to make a signal line throughiMAOnArray()!
 
виталик:

Hello all, please help with a piece of code to sort out ripped from an indicator PivotsDaily v2.mq4 how to convert it to an hour or half-hour, only in one way or another, so it would be clearer changes, please help, thank you in advance

Try changing TimeDay to TimeHour. Let me know what happens... if i could find an indicator, i would try it