EA for metatrader 4 (mq4)
The EA will
1. Calculate/plot high/low of a user input time period (typically based on the 5 minute chart) eg high low between 10.55 EDT and 14.20 EDT
2. Use this high low on ***any*** active chart of a higher timeframe (eg 15 minute, 30 minute or maybe a 1 hour) and draw a fib expansion/extension between the high and the low values obtained in 1.
This will be plotted from the high to the low within the user time period. Levels are to be both positive and negative i.e 0, 61.8, 100.....685 and also -61.8, -100, -261 etc. Bit like auto fib plot.
3. Draw MA7 (exp close) on active higher TF chart.
Place **pending** buy order if MA is (or has) moved above a level at the level behind it. Opposite for sell.
See picture. Buying/selling on a ***pullback*** to the level it has passed though.
4a. Spread must be user defined.
4b. Only x order at a time can be open (user defined)
5. If new cross by MA then prev pending orders close and entries defined on new position.
6. SL is 10 pips below the level below OR user defined hard SL. Each time price moves through next fib expansion level the SL will move to 10 pips below the previous level. Bit like trailing SL.
7. TP is partial close TP at each level the price hits until we reach preserve lots e.g 0.2 after which no more partial close, OR option for user defined hard level. (so option to choose one or other)
8. Trade time controlled by user for when to start trading and when to finish. All pending order removed at trade time end.
9. Option: Trade live or alert only.
Open terminal, EA starts running.
It looks back to see if MA has moved above or below an extension level which is drawn by EA - probably calculated from the 1 or 5 minute chart.
All trading is done on higher TF chart.
If MA has crossed up through and is above (for example) 61.8 level then pending buy order placed at 61.8 + spread with SL at 0 level - 10pips. Partial TP set at 100 level less spread.
If price reaches 100 - spread, it close half trade, move SL to 61.8 + 10 pips and so on.