I’ve been mind-sketching an experimental EA for a few weeks now.
i’m currently working on some sort of intelligence and learning abilities of the EA.
so that it gets better and better on each trade it makes and each signal it finds.
have done similar programs in other languages but MQL is still kinda strange to my mind. (as you need to know other things beside your algorithm and code skills)
since i think MT4 is gonna be forced to get abandoned, gonna use MQL5 for my EA.
So far have these questions , please suggest ideas on the following problems :
- The EA acts on new bar formation, but my part of calculations is for the last 5 bars only. (when a new bar #0 is opened, EA works on bar #1, #2, … , #5)
to make this easier to code, I think using an array of five elements is ok, which stores the OHLC data of the last five bars. (like this : double TheBarsData )
and each time a new bar is closed, the array elements get shifted one index, and the data for oldest bar is lost. (since it’s not needed anymore)
Is there a better (faster?) way to do this ? is the array an unnecessary addition ?
- since the EA considers it’s past trades info (overall win/lose rate, reliability factor for each signal type, trade success rates per week day etc.) to learn from it’s mistakes,
it needs to save data other than RAM variables. a reliable permanent-ish storage. that’s either Terminal Global Variables, or File.
which one do yo suggest to use for this purpose ? (or probably there’s other ways i’m not aware of)
- is it really better to write in MQL5 ? or MQL4 can still be a good candidate ?
considering it’s gonna be a multi-K lined program, and re-writing from lang to lang is a pain in tha ass, if you it were you, which language do you code in ?