Auftrag beendet
Spezifikation
Six EMA Fan is created and shown on the M15 chart in multi colors. EMA's must be external for optimization.
An external "Open Trade" variable to determine when the the long or short orders are to be opened.
Trade Signal 1:
Long: ema1 is greater than ema2 and ema2 is greater than ema3 and so on through ema6.
Short is opposite.
Trade Signal 2: External variables
Open Trade is 6 times EMA's with values from 9 though 56. Subtracting the 9 EMA from the 56 EMA will produce the Open trade signal. Sell signal would be the opposite.
Close Trade signal 1: l is similar to the Open Trade where the distance is measured over Periods 0, 1, and 2) when the distance is lowered 3 consecutive times the order must be closed. Since false positives do happen, I need to ensure that is the "Fan" opens back up again or completely changes direction that the next trade will start immediately.
Close trade signal 2:
should a major drop occur quickly before the 3 periods above, I want a Trade close extern variable value that will close the trade if met.
The attached file is my poor attempt to achieve this however I get multiple orders submitted at a time and not always meeting the criterion I set,
Take Profit and Stop Loss:
I need the external variables to select TP and SL as well as the externs to select the TP and SL limit should I want to use them.