You could so if "this" happens set a flag so "that" happens... probably easier to use the on trade tab... trade closed check why... do "that"... if you say what you want to happen I will tell you the blocks to use.
You can do it on fxDreema as a custom indicator only. If you find it, you can import it into your projects normally. However, not all custom indicators are compatible with fxDreema.