Hi brainjt,
It is not understandable concerning your rules to enter from your image.
And because of that I tried to code 2 EAs. Anyway you may see everything from inside the code.
Case #1.
Code:
You are entering if:
- RSI is crossing some level (above 70 for buy and below 30 for sell)
and
- one ema is above the other ema
(as confirmation of the trend)
----------------------
Case #2:
Code:
You are entering if:
- one ema is crossing the other ema;
and
- RSI is above some level (above 70 for buy and below 30 for sell).
So it is completely different cases to enter.
---------------------
And you want to close the order on: sl, and tp, and ts, and on RSI.
So case #2 is MA_ExpertProfit_1 (attached).
Case #1 is MA_ExpertProfit_2 (attached).
If you need to code something differently so it is very easy to change it from inside the code.