Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1102
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Like this.
And some optimiser passes coincide in the visualiser.
And some passes - not a single transaction at all.
Discrepancies may be due to uninitialized values in the indicator buffer - when the calculation passes, there may be rubbish in the buffer.
Simply print the buffer data when the signal appears.
Discrepancies can occur due to uninitialised values in the indicator buffer - when the calculation passes over, there may be rubbish in the buffer.
Simply print out the buffer data when the signal appears.
Are you talking about the EA?
If about the EA - I am zeroing everything in the example.
And if you're talking about an indicator - you can do anything. I'm not the author.
Are you talking about the EA?
If you're talking about an EA, I'm zeroing everything in the example.
But if you're talking about an indicator, it could be anything. I'm not the author.
I was talking about the indicator: if you miss some index in the buffer, there may be rubbish. In general, first a reliable indicator - and then the Expert Advisor using it.
Like this.
And some optimiser passes coincide in the visualiser.
And some passes don't match any deals at all
I think the problem is in the indicator.
And as Artem has rightly pointed out, the problem is in the actual data.
It just does not want to tell me how to do it)
No, I was wrong in thinking that you have a multi-timeframe indicator.
You have the most common indicator whose data you want to retrieve from someone else's timeframe.
In an EA, you need to check the relevance of the data from the desired timeframe. If there is no data for this timeframe yet, then exit until the next tick.
And then, when all of the data from the olderframe is received in the correct volume - then call the indicator.
Try to do it this way.
No, I was wrong in thinking that you have a multi-timeframe indicator.
You have the most common indicator whose data you want to retrieve from someone else's timeframe.
In the Expert Advisor, you need to check the relevance of data from the desired timeframe. If there is no data for this timeframe yet, then exit until the next tick.
And then, when all of the data from the older timeframe is received in the correct volume - then call the indicator.
Try to do it this way.
How do you do that? I mean to check its relevance.
Well, I check that it is not 0.0 (code above).
What else can I do? What the indicator gives me, I will take it.
This is what the indicator does.
How do you do that? I mean to check if it's up to date.
Well I check that it's not 0.0 (code above).
What else can I do? What I get from the indicator, I get.
It is an indicator for this reason.
Did you take indicator from KodoBase? If so, can you give me its URL?
How do you do that? I mean to check if it's up to date.
Well I check that it's not 0.0 (code above).
What else can I do? What I get from the indicator, I get.
It is an indicator for this reason.
The error is in the indicator itself.
I have rewritten a lot of Expert Advisors and this is the first time this problem occurs.
You may look and build the Expert Advisor yourself, I have given the logic above.
And you can see how badly the terminal and the tester behave. The results are different even if the indicator parameters are the same)
Did you get the indicator from KodoBase? If so, can I have its URL?
Yes
https://www.mql5.com/ru/code/64
Yes
https://www.mql5.com/ru/code/64
In general, you can test it for now (works on the indicatorPlombiers - oscillator in the channel- the indicator should be in the folder [data folder]\MQL5\Indicators\plombiers.mq5)
Trading strategy idea
The Expert Advisor works using the custom indicatorPlombiers. For signals formation two lines of the indicator are considered: "Resistance" and "Support".
Signal forBUY position opening: Low price on bar #1 was below the "Support" line on bar #1
Signal to open aSELL position: price High on bar #1 was higher than the "Resistance" line on bar #1
In general, you can test it for now (works on the indicatorPlombiers - oscillator in the channel- the indicator should be in the folder [data folder]\MQL5\Indicators\plombiers.mq5)
Trading strategy idea
The Expert Advisor works using the custom indicatorPlombiers. For signals formation two lines of the indicator are considered: "Resistance" and "Support".
Signal forBUY position opening: Low price on bar #1 was below the "Support" line on bar #1
Signal to open aSELL position: the High price on the bar #1 was higher than the "Resistance" line on the bar #1
Take the "Support" and"Resistance" values from the higher timeframe
I.e. the MTF indicator must be in the optimizer input
Like this