From what I gather, you must be a PRT user. There is no such thing as a limit/stop order with a diagonal price range with market exchanges. You can simulate it with code, which PRT does, but you have to code it yourself on MT4/5.
You have to calculate the function of your diagonal in the form of : y = ax + b. You can take two points (x1, y1) and (x2, y2) and calculate the slope 'a' as follows a = (y2 - y1) / (x2 - x1). You don't really need the value b.
Thus the process would be as follows :
1. Put a limit/stop order at price y1.
2. Update limit/stop order at price y2 = y1 + (y2-y1) = y1 + (a.x2 - a.x1) = y1 + a (x2 - x1). If you are in a fixed timeframe period (which is usually the case), then on each bar x2 - x1 = 1. So y2 = y1 + a for each bar or for each 'n' bar, yn = y1 + n.a.
Don't forget to leave an option to disable it and clean all open orders once closed.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello, I have a simple question, did you know if it is possible to launch an order when an INCLINED support or resitance is affected? thanks for the answers .