Chandelier - page 14

 
baykanur:

There is a clear description here, I showed in my post that the candle on H1 and H4 is different

https://www.mql5.com/ru/forum/131561/page12

I quote from

Open an order at current day's Open price in the same direction as the previous day' s candlestick(if it was bullish - open a Buy order, if it was bearish - open a Sell order)


Does "daylight candle" mean anything to you?
 
Cmu4:

Does "day candle" mean anything to you?

Please explain what a daily candlestick is, if possible give a precise definition.

 
baykanur:

Well please explain what a daily candle is, if possible give a precise definition.


A daily candlestick is the OHLC price of an instrument in one day. In the terminal it has the designation "D1" - day.
 
wmlab:

Tested as soon as the topic came up. It's leaking.

You can post the tests
 

Here's a simple EA I wrote. Shows a flat (with a stretch) on history.

Maybe, if you refine the logic - it will be profitable.

So, if anyone has any ideas, let's discuss!

p.s. there was some kind of glitch with the replies, so the EA is saved with an extra "6".

Files:
 
Cmu4:

Here's a simple EA written. Shows a flat (with a stretch) on history.

Maybe, if you refine the logic - it will be profitable.

So, if anyone has any ideas, let's discuss!

p.s. there was some kind of glitch with the replies, so the EA is saved with an extra "6".

Why is there a value in the inite?
 
grell:
What is the value in the inite for?


I wanted the Expert Advisor to wait for a new day, and not to open a position immediately at startup.

Also, because the Expert Advisor was written only for testing, I assumed that the values of "Hi" prices will not repeat on different days. But even if they repeat, the Expert Advisor will skip this day and will not open any position, so it is not critical.

 
Cmu4:


So that the Expert Advisor waits for a new day and does not open a position immediately on startup.

Also, because the Expert Advisor was written only for a test, I assumed that the "Hi" price values of the days will not repeat. But even if they do, then our EA will skip this day and will not open any position, so it is not critical.

There are other ways to do this.
 
grell:
There are other ways to do it.


Yes, of course, I'm sure there are. But my little programming experience so far allows me to handle the situation only in this way. If you show me other ways which are less resource-consuming with respect to system resources, I'll be grateful.

p.s. By the way. As far as I know, the code is executed many times faster if the if condition is simple. Is it so? I.e. instead of if ( a==b && b==c) {...} you'd better write if (a==b) { if (b==c){...}}?

 
Cmu4:

As far as I know, the code executes many times faster if the if condition is simple. Is it so? I.e. instead of if ( a==b && b==c) {...} it's better to write if (a==b) { if (b==c){...}}?


If the first condition didn't work, the second one certainly won't. Saves a lot of time