Hello Everyone,
This is my first question on the forum and I thank you all in advance for the help. I am new to robots and may be asking some ignorant questions, so please bear with me.
IF THE ANSWER TO THE QUESTION BELOW IS DIFFERENT FOR MT 4 vs MT 5, PLEASE SPECIFY.
I have a robot that is mostly completed. The robot identifies a resistance level and then puts a BUY STOP, let’s say 1 pip (i.e. 10 micropips) above the resistance. As a result it has a BUY STOP at a specific level that is sitting there statically. In our example, say we have a BUY STOP at 1.20550 for 1 lot. The price crosses this critical level and we open the position -so we bought 1 lot at some price which we cannot be sure of until the order gets executed. We of course cannot assume that we will buy at exactly 1.20550. The price might have moved up rapidly or gapped up and we may have bought at a different price. Assume we bought at 1.20560
What we want the robot to do is to go in and enter some kind of instruction to automatically close the order 20 micropips below the level at which the order was actually executed, so at 1.20540 in this case. However, we do not want to rely on the robot to execute the closing trade when the critical level happens. instead, we want to send the STOP order to the broker so that if the computer crashes, or our internet crashes*** we can still close the position. I.e. can the robot go in and send such an instruction to the broker to “CLOSE STOP” (just made that up now) in case price comes down to 1.20540 or lower.
Again, I know this is an ignorant question, but right now, I cannot even manually make that adjustment in MT 4. Once the demo version of my robot opens the order at 1.20560, I right click on the order and hit “Close Order” and then when I enter a pending SELL STOP, that is entered as a separate order. What I mean is that when the stop level is hit, the program opens a separate sell order as opposed to closing the existing open buy order. I do not think this is related to the robot, because it happens even when I try to enter the SELL STOP order after stopping auto trading and removing the robot.
*** I know the few issues I mentioned above can be eliminated by running the robot off a server. That is a separate issue, which I will please ask about a little later. I do not want to throw in two things simultaneously and make it more complex than it needs to be.
Once again thank you very much
Elliot