Code a function that has the last X ticks available for further reference in my EA

MQL5 Esperti Librerie

Lavoro terminato

Tempo di esecuzione 1 ora
Feedback del cliente
Everything did go absolutely smooth and perfect from start to the end: quick turnaround time of only 1 hour, absolutely professional and perfectly working code without any adjustments needed, friendly and fast (all my messages have been answered in under 5 minutes each time) communication in perfect English... what more could you ask for?? 1A+++++ HIGHLY RECOMMENDED!
Feedback del dipendente
Thanks!

Specifiche

I have my own EA that needs an extension. It runs on the M1 timeframe and hence refers price action in the form of Open[0] Open[1], etc etc... But I want that I can also refer the last X ticks. Since Metatrader can´t run tick-charts, I need a function that logs the ticks that come in from the broker and I want then be able to refer to them within the EA itself. So I want to be able to not just (example) do a "if Close > Open[0]" within my EA, but also "if Close > Ticks[10]" for example, hence expressing that the current Close (so the current tick) is greater than the price 10 ticks ago.

Such a function should be easily doable for a pro-coder that is capable of loops / arrays. I definitely will need it as a function that I can reference to within the EA and would like to pass it the period of the ticks to refer back and it returns the price as double. So if I call the function with "Ticks(10)", it would then return the price of 10 ticks ago. If I call it with "Ticks(20)" it would return the price 20 ticks ago, etc.  Of course it would also make sense to put a final limit of how many past ticks the function stores, that should also be a configurable variable since I will most likely not need to look back more than 200 ticks - but it should definitely be able to be changed.

P.S.: There is no need for you to check if the price of the incoming tick is equal to the previous tick and then skip it, since many brokers deliver the same tick in a row without a price change, I already have a filter for that in place on the global scope within the EA so that it only processes if the new price of the new tick is different from the last tick price.

P.S.2: I forgot to add that the function should of course  separately log Ask and Bid prices - just the same functionality as above but separately for Bid / Ask.

Con risposta

1
Sviluppatore 1
Valutazioni
(461)
Progetti
902
77%
Arbitraggio
25
16% / 68%
In ritardo
100
11%
Gratuito

Informazioni sul progetto

Budget
10 - 20 USD
IVA (19%): 1.9 - 3.8 USD
Totale: 11.9 - 23.8 USD
Per lo sviluppatore
9 - 18 USD
Scadenze
da 1 a 7 giorno(i)