Attached is the new EA as well.
I am posting the MQ4 file, as I want Admin or other coder to have a look at something that boggles me.
The EA works fine, BUT you have to drop it on the same chart time frame as your signal Time frame , else it gives the main (or trend direction) a 0 value, which means it will never take a trade.
(Lines 240 - 243 are only there to check values, once you are happy with the EA, I will remove the print function, or explain how to do it)
I have included a message box which will remind you to change your chart time frame if it is not the same as the Signal time frame .
PS. The signal time frame will always be the smaller TF, just in case you didn't know. And you can set both TF's to the same, then it will just trade as if it is on 1 TF.