Temporary storage of data by an MT4 or MT5 robot is that possible???
- Looking for very basic EA's
- Pending Order EA with MAs
- Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes
Hello god . Yes
It could be like this :
Looking for an EA that operates on fast / slow ma crossovers .
When the ea starts it should scan the history of the symbol it is attached to , only the native timeframe , and collect data about each range between 2 ma crossovers
An ma crossover range is the area of the chart between 2 ma crossovers .
From this area the ea should remember :
- The maximum price as tp if the crossover (the left in the range) is the fast going above the slow ma.
- The minimum price as sl if the crossover (the left in the range) is the fast going above the slow ma.
- The opposite for when the fast goes below the slow ma
The sl and tp must be calculated as a distance from a hypothetical open price and that open price should be considered the moment in time when we "see" the ma cross (not the bar on the cross)
The sl and tp must be collected and maintained in a list for each trade type (buy/sell) so when a live crossover happens we can instruct the ea to calculate the average of the top/bottom x amount 40 most recent sl/tp stored in the lists to decide upon the size of the sl and tp for the live trade.
Any new crossover ranges that conclude must also be added in the collection
It's excellent !!!!
Thank you so much.
The most important term I was missing was storing SL and TP in a list...
You understood perfectly and very quickly.
This will help me effectively describe my need to a freelancer.
Have a great day and thank you for taking the time to reply !!!!

- Free trading apps
- Free Forex VPS for 24 hours
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use