[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 482

 
AndrejFX:
Colleagues, I have looked through the code a hundred times - I don't see any errors. The Expert Advisor itself trades, but the log shows many errors: zero divide
The Expert Advisor is small, please check
This division by zero look for where something is divided.
 
AndrejFX:
I have looked through the code a hundred times and see no errors. The EA itself trades, but the log gives a lot of errors: zero divide
The EA is small, please take a look


in the code there is a division by the value of the variables

   double candle1size=MathAbs(10000*(iOpen(0,PERIOD_M5,1)-iClose(0,PERIOD_M5,1)));
   double candle2size=MathAbs(10000*(iOpen(0,PERIOD_M5,2)-iClose(0,PERIOD_M5,2)));

In the case of dojj, it's a division by zero.

 
abolk:


by the code there is a division by the value of the variables

in dodge's case, it's a division by zero

Oh, man, that's right. Thanks for the tip.
 
AndrejFX:
Colleagues, I have reviewed the code a hundred times - I don't see any errors. The EA trades by itself, but in its log it generates many errors: zero divide
EA is small, please check it

One more thing: when defining a lot, the formula used is

NormalizeDouble(1/SL,2)

where SL is the lot size.

If SL=10, lot =0.1.
If SL=100, lot =0.01. What if the maximum allowable lot =0.1?

 
abolk:

One more thing: when defining a lot, the formula used is

Where SL is the lot size.

In case SL=10, lot =0.1.
In the case where SL=100, lot =0.01. And if the maximum allowable lot =0.1?

My brokerage company has 0.01, but I don't really care about that. The main thing for me is to find out how well the strategy works. If after optimisation of all parameters something interesting will come out, then I will include this code in my main EA, and there already another MM (martin).
 
I'm looking for a simple EA that opens the next trade only after the close of the previous one, with SL and TP settings, and preferably without martin. Anyone who knows where this is available??????????
 
boltergeist:
I'm looking for a simple EA that opens the next trade only after the close of the previous one, with SL and TP settings, and preferably without martin. Anyone who knows where this is available??????????

There are some
 

Hello: In the indicator the signals appear on the bar at the moment when the beam ZZ appears.

Please advise pliz. how to make ... if possible... to see the signals on the work from the older TF (approx. working M30-senior H1).

Thanks in advance!

 
vizavi:

Hello: In the indicator the signals appear on the bar at the moment when the beam ZZ appears.

Please advise how to make, if possible... to see the signals on the working one from the older TF (approx. working M30-senior H1).

Thank you in advance!



We have to replace everything

High[] и Low[]

at

iHigh() и iLow()

I have already done it, the code is attached. Change the indicator name to eg _m__Dinapwtar.ezigwzag-M60.mq4 and put it on any TF together with the main one.

If the major TF you have is different, then in the code you need to change all digits of 60 with the digit, corresponding to another TF. Or it is possible to bring the parameter into settings and put this parameter instead of digits.

In general, we can create one indicator and set the TF parameter in the settings. In this case, we can put the same indicator on the chart with different TF parameters.

 

This would be more correct. But it will only work correctly on M30, but it shows signals from M60.

If you make it detailed and universal - you have to dig around. Who developed the code? The counted_bars is not used anywhere, although it is set.

Reason: