Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1234

 
Fast235:

how in an indicator working in M1 to get data from D1, if the indicator is based on formulas and there is no call of standard indicators such as =iMA(Symbol(),Period(),....

where do I get my calculation from?

The same indicator data? Or what data?

 
Aleksey Vyazmikin:

The same indicator data? Or what data?

Yes, the same, but with D1 for example

i understand correctly, i need to create a handle on the same indicator (inside) with period D1?

is this solution correct? or there are better options

---

M1 needs to receive a text of the OBJ_LABEL type with data from D1

Remember, the indicator does not call the standard indicators - iMA and others

 
Alexey Viktorov:

You shouldn't be offended. The highest probability is an error in the code. In second place is the exorbitant spread. But who but you can discard the first option and begin to consider the second without seeing the code. And you have chosen the wrong topic, I hope the moderators will move it.

Thanks for the adequate reply. I am not offended, I am upset))). I wrote to try and find a quick solution, which maybe someone who has already encountered it has. The code is absolutely standard, totalprofit loop summing and comparing to a given value, moreover the code has been working for a couple of months on two different accounts without failing. Have a nice day.
 
Fast235:

Yes, the same, but with D1 for example

do I understand correctly that I need to create a handle on the same indicator with period D1?

Yes, of course.

Either factor in the logic of the indicator to calculate from any TF, which can be an order of magnitude more difficult to implement.
 
Aleksey Vyazmikin:

Yes, of course.

Either factor in the logic of the indicator to calculate from any TF, which can be an order of magnitude more difficult to implement.

Great, thanks.

couldn't find the exact solution through the search, only mladen has these indicators

 
Fast235:

Great, thanks.

Couldn't find the exact solution through search, only mladen has such indicators

Such indicators have a problem in MT5 - when applied it often happens that the buffer may be empty - this has to be checked.

I think it is a matter of luck since the calculation of indicators is sequential in MT5 and if the indicator handle of a minute indicator is first calculated (final data receiver) and then it sends information to the indicator working in the upper TF, the minute indicator will receive either old data or zero, which is more often the case with me.

 
Aleksey Vyazmikin:

Such indicators have a problem in MT5 - when applied it often happens that the buffer may be empty - this has to be checked.

I think it is a matter of luck since the calculation of indicators is sequential in MT5 and if the indicator handle of a minute indicator is first calculated (final data receiver) and then it sends information to the indicator working in the upper TF, then the minute indicator will receive either old data or zero, which is more often the case with me.

Duly noted, thanks

-----

Is there anything the developers can add?

 
Fast235:

Taken note, thank you.

-----

Is there anything the developers can add?

This is especially critical if the EA only works on the opening of a new bar - I now check the buffers of such indicators, and if they are empty, I skip to the second tick. For OHLC there may be a big error. Indicators are good for debugging ideas, but essentially bad in EAs.

 
while this is not available for work, I'd rather connect it separately
 
Evgeny Vlasov:

The second time I've had the temerity to write a question on the forum, only clowns who just want to write something are answering... Please, if you have thoughts only on how "sort of make fun" then do not write, have not encountered such - do not write. I'll plough through the code myself! Are there only snot-nosed boys sitting on the forum who have nothing else to write except ponuts...

Eh. People are very touchy with jokes these days. But, as they say, every joke has its share of a joke...

No code, no market, no nothing...

Highlighted the most likely answer to the question. IMHO, of course, but it looks a lot like clearing))))

Reason: