I have a trading plan that I wish to semi-automate on MT4 and am pretty sure that writing a script would be the best way to go, though having only just started to learn MQL4, I am not 100% sure whether this would be the best solution.
The basics of the plan is to open an immediate order as soon as the current bar closes above/below a certain price (inputted by the user), and this price is determined once a certain three bar pattern has been established. Therefore I figured that as soon as this pattern has completed on the chart (any pair, any TF) I could just drag the script onto the chart, input the price, and it would sit there waiting for the time when the latest bar closed above/below the designated price, and then it would spring into action.
TP and SL are also determined by this three bar pattern but they be worked out by having user inputs for the top and bottom of the three bar pattern.
I originally thought about trying to write an EA for this, though then realised that I would have to program how to recognise the pattern in the first place, and so although I can't sit in front of the screen all day to trade this manually, I am able to check the charts every few hours (it will mainly be traded with H1 and above) and so I would just drag the script across to the chart when necessary.
Please forgive my inexperience on this matter, though I am presuming in all of this that the following is programmable:
The basics of the plan is to open an immediate order as soon as the current bar closes above/below a certain price (inputted by the user), and this price is determined once a certain three bar pattern has been established. Therefore I figured that as soon as this pattern has completed on the chart (any pair, any TF) I could just drag the script onto the chart, input the price, and it would sit there waiting for the time when the latest bar closed above/below the designated price, and then it would spring into action.
TP and SL are also determined by this three bar pattern but they be worked out by having user inputs for the top and bottom of the three bar pattern.
I originally thought about trying to write an EA for this, though then realised that I would have to program how to recognise the pattern in the first place, and so although I can't sit in front of the screen all day to trade this manually, I am able to check the charts every few hours (it will mainly be traded with H1 and above) and so I would just drag the script across to the chart when necessary.
Please forgive my inexperience on this matter, though I am presuming in all of this that the following is programmable:
- Once the script has been dragged onto the chart, it will monitor the close of every bar until the price has been breached, at which point, it will open an immediate order at the current price.
- The script can be cancelled at any time.
If I am wrong in my assumption that a script would do the job then please feel to let me know and I will try and find another way!