![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Hi Mladen,hi Mr.Tools,
i need some help. Is it possible to code this indi that it only shows signal at close of candle? Sometimes signals appear also in the middle of the newest candle and this is definitely too late. Is there a possibility to filter this out.
I would be very grateful and keep up this amazing work.
sma_crossover_justin.mq4
Thanks in advance
Vito
techmac,
Could you clarify, for the rest of us, which 'P-code' you mean, as there are 9 types?
https://en.wikipedia.org/wiki/P-code
Big Be
Topic started on Post 5212:
Depends what do you consider a "%"
If it is position, then you do not have to order them.
If it is values, you have to do order them. One way of getting something similar to that would be this : https://en.wikipedia.org/wiki/Quantile .
Otherwise you would heave to have a double loop : first to determine the values and second to find the values of interest. Double loop is of n^n complexity and if you try to use it on a buffer off the whole history, you are risking terminal freezingmladen,
Thanks for the tips. I then did 'research' and eventually stumbled across a reference to MT4's ArraySort() function /command. I think it will prove adequate, especially as I should be able to only update once per bar. I had no idea this existed. I learn commands on a "I need this" basis, rather than try to memorize the entire MQL Reference document.
Big Be
techmac,
Could you clarify, for the rest of us, which 'P-code' you mean, as there are 9 types?
https://en.wikipedia.org/wiki/P-code
Big BeP-code is directed to an interpreter (terminal in mt4 case) between the machine code (assembler == exe, dll, and so on) and pseudo code that executes at about 1% speed of assembler or C/C++ compiled exe or dll code
As a test : compare a simple loop test written and compiled in C and MQL (make some BIG loop for C, or else you are going to miss execution time). P-code is intended to make things compatible over different operating systems and processors, but that was abandoned in any time critical application due to its very, very slow execution. Inventor of the concept was Donald Knuth way back in 1958
techmac,
That is remarkable information. It makes me wonder what computer languages they teach in Russia, that someone thought it was a good idea.
How did you determine it was P-code?
P.S. I can't do the loop test as I have not studied C.
Thanks,
Big Be
techmac,
That is remarkable information. It makes me wonder what computer languages they teach in Russia, that someone thought it was a good idea.
How did you determine it was P-code?
P.S. I can't do the loop test as I have not studied C.
Thanks,
Big BeThat is not a bad idea (the p-code and a p-code machine - it is a basis of a lot of very good things, and Donald Knuth is a real genius). Java is using that same principle, as an example.
The bad is how metatrader made it and that they did not make any API available at all (every normal trading platform has an API : tradestation, metastock, ninjatraded, ...). Only the "bright guys" from metatrader decided not to have API
Hello everyone, can you add an input parameter in this indicator
5_34_5.mq4
Hello everyone, can you add an input parameter in this indicator 5_34_5.mq4
tristantsh
That indicator uses 4 future bar values which makes it a repainter. Input parameters can be added but it will still remain a repainter
no problems mladen. And thanks for his quick reply![](https://c.mql5.com/forextsd/smiles/teeth_smile.png)
no problems mladen. And thanks for his quick reply
I am afraid I do not understand the answer
Do you still want those input parameters even though it will still remain a repainting indicator?