Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
deVries,
Thanks.
By this code, I think I have included your comments but it can certainly be improved.
I still listen to all remarks to improve if you see aberrations writing
Thanks again
Not only look but also Read this topic. Checking trades of your EA count down.
Thanks deVries,
Very good Topic. I think I have followed the advice
Not only that part but also you have to change
where it is counting up and
this part....deVries,
I had already changed to keep the same logic but not shown
How do you get those values ???
DeVries,
I get by external parts
and the stochastics calculation
If you see something that can be improved...
If you look to the sell trades of your EA Then why do you think it is trading two bars same crossing
The bar before first sell green line > red line stochastic
at first bar with sell at opening still green line > red line
price moves down red line becomes > green line sell opened
pinbar==> we see price close almost at openingprice green line again > red line
and you have had a sell trade while it looks there was no crossing
.
Taking Stochastic current at bar 0 and recalculate every tick will make it trade this way
If you don't want this to happen you have to wait for bar closing and look that time for opening new trade
If you set extern int Sto_Shift = 0; //it trades at bar 0
If you set extern int Sto_Shift = 1 ; // you will trade on the values at close bar
{ if (Sto_Take_Profit == 0) { Vente=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,0,"Mono Stochastic : Vente",Magic_Number,0,Red); Total=OrdersTotal(); } if ((Sto_Take_Profit > 0) && (Bars != BarsCount)) { Vente=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,Bid-(Sto_Take_Profit/10000),"Mono Stochastic : Vente",Magic_Number,0,Red); Total=OrdersTotal(); BarsCount=Bars; } }What improvements do you think you can make on your OrderSend() function
My Sto_Take_Profit is bad
I have seen examples with "point", but it is not very clear and the result was incorrect