I think I’ve found the solution, there is a method called General, which takes an index of the signal to use as general, I’ve change it to be the index of my filter and now the base price is correct being used.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello, I've been trying to write a signal which places stop orders instead of executing on market price.
The problem I'm facing is, m_base_price is zeroed after each call to either
Here:
My idea was to set the stop price inside the methods
But, when the expert is running, the Processing method is called, which in turns call CheckOpen, which calls:
So, even if I set the BasePrice in my signal, in both `Shortcondition` or `LongCondition`, the `m_base_price` is reset after the call to `CheckOpenLong`, by the time it check `CheckOpenShort`, when the signal must create a stop order, it creates a market order, because `m_price_base` is now 0.
How do you normally set stops order when developing a signal?
Thank you very much in advance.