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

 
rigonich:

I think this function returnsTrue if the market is open andFalse if it is closed.


I think this is a reference to trader's trades and not to trades in the market in general.

I'll check it tomorrow.

 
lottamer:

https://forum.mql4.com/ru/38949/page4#434232

Sorry, apparently this is what you need, but unfortunately not me.
 
lottamer:


I think we are talking about the trader's trades and not about trades in the market in general.

I will check it tomorrow.


You are right, it is a Kim function.
 
lottamer:


found an option.

there is this function

function isTradeToDay().

This function returns the trade flag for today. Flag is up -True- there were opened positions today. Flag down -False- no positions opened today

But I wonder - if a position is opened at 11 PM and closed at 4 AM, what will this function show at 7 AM?


It will show whether or not a trade was opened today. That is, from 00.00.00 until the time the function is called.
 
Who knows if it is possible to know the market closing time in advance through the terminal, or does it depend on the broker you work through and it is not possible through the terminal? if it is possible, can you tell me how?
 
rigonich:
Who knows, is it possible to find out the market close time in advance through the terminal, or it depends on the broker you are working with and if it is possible, tell me how?

DC!= Broker. - A small digression for the sake of "clarity of conversation" (most DCs are not brokers).

I haven't seen such a function in MQL4, but it is possible to run through the history and see when the "hole" starts at the weekend.

 
rigonich:


Sorry, got "bogged down". I noticed your question in the morning, I wanted to answer it right away, now it is night, and I just got up. This is done in the following way:

1. First, run your EA for testing without visualisation, then open a chart and save its template under your EA's name.

2. Close the chart, start the Expert Advisor in visualization mode, setting the fastest speed, because it is a four-hour chart, and watch.

3. I think all questions will disappear.

P.S. Or print out the indicator values before placing an order and then look in the logs.


Thank you very much))), but now I don't know what to do to ignore these temporary stochastic crossovers???
 
TarasBY:

BC!= Broker. - A small digression for the sake of "clarity of conversation" (most DCs are not brokers).

I have not seen such a function in MQL4, but it is possible to run through the history and see when the "hole" starts at the weekend.

 
TarasBY:

BC!= Broker. - A small digression for the sake of "clarity of conversation" (most DCs are not brokers).

I have not seen such a function in MQL4, but it is possible to run through the history and see when the "hole" starts at the weekend.

"I thought if you ask about CCs, the banks are not involved. If you ask about the banks, the CCs are not involved, that's why I asked about brokers. I want to do something like protection from gaps at market opening after the weekend to close before the weekend. No problem with weekends, but the holidays... I searched by myself, did not find it, decided to ask, maybe I searched wrong?
 
Equilibrium:

Thanks a lot))), but now I don't know, what should I do to ignore these temporary crosses of stochastics?


Not to work on the zero bar, there is no other way.

P.S. In general, this is the main problem with all indicator strategies. Every indicator lags. Some are more sensitive and some are less sensitive. The more sensitive the indicator __ the more false positives it has. If the sensitivity is low, it misses most of the movement, and as a result the profit is decreasing, if it is high, the losses will increase due to false operations. In order to find the "golden mean" the optimization of parameters is performed. In contrast, working on the 0 bar increases the sensitivity of the indicator and not gradually, but abruptly, with all that implies.

Reason: