Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 753

 
tuner:
This is exactly the idea, to speed up the code to perform some functions once a day. For example, in this block you can check if it's winter, if it's Friday or if it's the day when the clocks are changed. I think there's no sense to perform these checks every tick, it's enough to check every day on the first tick of a new daily bar. The code in the tester works correctly, and I don't see any reason why it might not work. Thanks for the advice, I'll see what's up with the structures...
I get your idea, but the entry will be at the beginning of the day, and the timing check is only in the evening. Or not enough code to understand what's going on. I was only judging from the piece of code available.
 
AlexeyVik:
I understand your idea, but the input will be at the beginning of the day and the time check only in the evening. Or not enough code to understand what's going on. I was judging only from the available piece of code.

The time check happens every tick

 
tuner:

Can you guys tell me what might be causing the glitch that occurred today?

The EA has an option to stop trading 15 minutes before market close on Friday.


Check the value you get here: FinishInFriday=StringToTime("23:59")-15*60; something tells me it will be less than the one you get here:cur=TimeCurrent()
 
VladislavVG:
Check the value you get here: FinishInFriday=StringToTime("23:59")-15*60; something tells me it will be less than the one you get here:cur=TimeCurrent()

Yes, that's the problem, when the first Friday tick arrives, theStringToTime("23:59") function is executed, which for some reason returns the time with yesterday's date, not the date of the new tick. I cannot understand how it can be so. Because it is clearly written in the code, if there is a new daily bar (tick with a date different from the previous tick), which is Friday, perform the functionStringToTime. And despite this, the function returns the 23rd, which is Thursday(!). Again, I have not observed such a glitch in the tester. However, I see that the EA does not trade on real or demo Expert Advisors and the messages in the logs show that the function did not return the current date but yesterday's date:

0 05:59:47.731 Scalper GBPAUDpt,M1: Finish In Friday = 2014.10.23 23:44:00

0 03:00:11.999 Scalper EURUSD,M1: Finish In Friday = 2014.10.23 23:44:00

PS The Expert Advisor stopped trading from the first tick on Friday, i.e. exactly after the StringToTime function was executed

 
tuner:


I would say it should be something like this in this case:

if(TimeDayOfWeek(cur)==5)
      if((TimeHour(cur)>22) && (TimeMinute(cur)> 44))
         return;
 
Hello, dear forum participants! First of allthis post is addressed to people interested in the development of their analysis systems, more specifically, intechnical indicators. I am more or less familiar with Signal Processing Toolbox based on MATLAB and have an idea of spectrum analysis and discrete filtering of time series. I am interested in complex IIR filters such as Elliptic, Chebyshev. I synthesized coefficients of Chebyshev filter via MATLAB, i.e. denominator and numerator of filter (coefficients are attached below). Now the main thing: how to implement a Chebyshev filter with specified coefficients in an indicator using MQL4? Please help. I would like to hear constructive criticism, remarks. The filter, the coefficients of which are presented, has 8 sections and this filter has order 16. In the comparison screenshot a simple MA is red, Chebyshev FIR filter is green, initial time series is blue, it is M60 NZDUSD.Screenshot
Files:
 
nikitasa1997:
Hello, dear forum members! First of all, this post is addressed to people interested in the development of their analysis systems, or more specifically, intechnical indicators. I am more or less familiar with Signal Processing Toolbox based on MATLAB and have an idea of spectrum analysis and discrete filtering of time series. I am interested in complex IIR filters such as Elliptic, Chebyshev. I synthesized coefficients of Chebyshev filter via MATLAB, i.e. denominator and numerator of filter (coefficients are attached below). Now the main thing: how to implement a Chebyshev filter with specified coefficients in an indicator using MQL4? Please help. I would like to hear constructive criticism, remarks. The filter, the coefficients of which are presented, has 8 sections and this filter has order 16. In the comparison screenshot a simple MA is red, FIR Chebyshev filter is green, initial time series is blue, it is M60 NZDUSD.

compare and contrast... In my opinion the MA works more accurately (compare - at what price the signal (crosses) actually came in):

According to your filter the signal will be the opposite, then you can apply...

 
_new-rena:

compare and contrast... In my opinion the MA works more accurately (compare - at what price the signal is actually received (crosses)):

According to your filter the signal will be the opposite, then you could apply...

Well, if the opposite will be more than 75% of correct inputs, you could apply, all that remains is to find the outputs ;)


Although most of inputs there are in the middle, which can be achieved with conventional MAs, without any twists.

 
evillive:

Well, if the opposite is true for more than 75% of inputs, you could apply, all that remains is to find the outputs ;)
Although most of the inputs are in the middle, which can also be achieved with conventional MAs, without any twists.

That's what I'm saying.
 
Who knows the command to programmatically open a tool chart window, please advise ?
Reason: