[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 136

 
whatever you can make a ZZ out of (not mine) https://www.mql5.com/ru/code/9148
 
What about that zigzag built into the standard Metatrader indicator set?
 
People, help me, how to correctly prescribe StopLoss in an EA
 
BADVAY:
People, help me out on how to get a StopLoss in an EA.
A proper StopLoss is one that happened before you entered the trade.
 

DmitriyN

I agree, and yet.

found an EA on codeBase https://www.mql5.com/ru/code/8416

It works perfectly, but there is no stop loss.

I have been working with this tutorial for two weeks now, but I cannot understand anything.

I need help writing a stoploss in it.

 
BADVAY:

DmitriyN

I agree, and yet.
found an EA on codeBase https://www.mql5.com/ru/code/8416
Works perfectly but no stoploss.
I have been working with this tutorial for 2 weeks now, but I still do not understand anything.
Help me write a stoploss in it.

MartingailExpert_v1.0_Stochastic - how do I feel about it?

First of all martingale is the horror of amityville itself.
Secondly - stochastic, i.e. indicator with clearly defined period(s), which in principle will never work. Do you understand? Never!
Third - version 1.0 - as a rule anything with this version, whatever it is, should be avoided.

Last but not least. Understand that stops should not be constant. How can they be constant if the price is non-periodic and non-amplitude? Absurd.

So 2 weeks is not surprising. You will soon agree with me.

 
MartingailExpert_v1.0_Stochastic (1)
RoboForex-Demo (Build 451)

SymbolEURUSD (Euro vs US Dollar)
Period30 Minutes (M30) 2012.12.03 00:00 - 2013.02.05 22:30 (2012.12.01 - 2013.02.06)
ModelAll ticks (most accurate method based on all smallest available timeframes)
Parametersstep=1; StepMode=0; proffactor=30; mult=1.5; lotsbuy=0.5; lotssell=0.5; TrailingStop=20; per_K=9; per_D=3; slow=2; zoneBUY=1; zoneSELL=1; Magicbuy=1; Magicsell=2;
Bars in history3107Modelled ticks348510Simulation quality67.79%
Chart mismatch errors13
Initial deposit10000.00
Net profit135887.47Total profit442285.60Total loss-306398.13
Profitability1.44Expected payoff1637.20
Absolute drawdown345.00Maximum drawdown113125.00 (78.56%)Relative drawdown78.56% (113125.00)
Total trades83Short Positions (% Win)30 (40.00%)Long positions (% win)53 (83.02%)
Profitable trades (% of all)56 (67.47%)Loss trades (% of all)27 (32.53%)
Largestprofitable trade47412.54losing transaction-37247.40
Averageprofitable deal7897.96losing transaction-11348.08
Maximum numbercontinuous wins (profit)33 (372337.99)Continuous losses (loss)25 (-306312.00)
MaximumContinuous Profit (number of wins)372337.99 (33)Continuous loss (number of losses)-306312.00 (25)
Averagecontinuous winnings19Continuous loss9

Here's what he gave me

 
He has honestly told you that he is willing to drain any money entrusted to him.
 

Please advise. There is a buffer in the indicator Buf[i] that has different values at different moments. How to sum all of the values of this buffer on the chart?

Suppose Buf[1]=6, Buf[2]=2, Buf[3]=5... and so on, I know how to sum 3 values, but if I don't know how many of these values there are, how can I sum all the values and assign the result to a variable?

 

int i=0;

double SomeVariable=0:

while( i<Bars ){

ImmobileVariable+=Buf[i];

i++;

}