FOREX - Trends, forecasts and implications 2016 - page 723

 
Vladimir Zubov:
Well, I do it for market, and I always block the candlestick in this way. But if people ask me why it has opened twice and I don't know why? It will not be good ...)

I told you - why two orders - read here at the very end

Forum on trading, automated trading systems and trading strategy testing

FOREX - Trends, Forecasts and Consequences 2016

new-rena, 2016.08.18 05:30

1.

if(iTime(Symbol(),PERIOD_H1,0)==prevTime) return(0);

datetime prevTime=iTime(Symbol(),PERIOD_H1,0);

Further your code

And that's it....

//This is for H1

Ah yes, the bar is looking there. Well, it will pull then.

And after int ticket=OrderSelect() - do you have analysis - has the order opened or not? if(ticket<0)GetLastError() - do you have it?


 
Vladimir Zubov:

OK, but in my code, could the gaps have affected that the code got "messed up" ?

That's exactly what caused it. But the tester doesn't care about that.
 
new-rena:
just because of them. But the tester doesn't care about such things.
I didn't really go into the logic of your code. Would your code behave correctly or the same as mine ?
 
Vladimir Zubov:
I didn't really go into the logic of your code. Would your code behave correctly or the same as mine ?

Well, I did that trick a long time ago. Somewhere I've looked for link to my code, which is still in 14th year on 4-rka. Setka. look there - how to open / close an order. Redo it short and it will be OK.
https://www.mql5.com/ru/forum/152182/page133

FOREX - Тенденции, прогнозы и следствия (Эпизод № 39: Июль 2014) Продолжение следует... (pako) - MQL4 форум - Страница 133
FOREX - Тенденции, прогнозы и следствия (Эпизод № 39: Июль 2014) Продолжение следует... (pako) - MQL4 форум - Страница 133
  • www.mql5.com
FOREX - Тенденции, прогнозы и следствия (Эпизод № 39: Июль 2014) Продолжение следует... (pako) - MQL4 форум - Страница 133
 
new-rena:
Well, I have long done this trick. Somewhere I'm here a link to my code, which is still in 14-m lying on the 4-rka. Setka. Look there - how to open / close an order. Redesign it and it will be OK.

Yes, I am confused by the fact that even the terminal has not drawn order opening, I suspect a glitch, I'll remove the publication until I find out at least for myself why it happened, opened twice, but it is not drawn even ... I do not believe in these fairy tales)

In the logs, the position of the owl is open ...

 
Vladimir Zubov:
Yes, I am confused by the fact that even the terminal has not drawn order opening, I suspect a glitch, I'll remove the publication until I figured out at least for myself why it happened, opened twice, but it is not drawn even ... I don't believe in such fairy tales)
Of course not. DC has nothing to do with it.
 
Vladimir Zubov:

...

The owl position is open in the logs ...

It was clear from the start.
 
new-rena:
Of course not. The DC has nothing to do with it.
Well, if DC is still involved, I can't do anything about it) I haven't complained about my code in five years)
 
Vladimir Zubov:
I have not complained about my code for five years).
Lucky you)) And it took me 4 years to figure out what in '12 led me to plum after 11-fold increase in the deposit)))
 
new-rena:
Lucky you) I spent 4 years trying to figure out what in '12 led to my loss after an 11-fold increase in the depo))))
What was so bad in '12 or was it the code?