작업 종료됨
명시
I have a completed MT4 indicator with *.mq4 file. This indicator when applied will show buy/sell arrows on the chart.
What I want to accomplish is to convert this indicator into an automatic trading EA. Whenever the indicator has a buy arrow, the EA will execute buy; and when a sell arrow appears, the EA will sell. And when trades are open, it will automatically apply TP and SL which I specified in the input window. TP will have three levels: First TP will close 50% of the trade, Second TP will close 50% of the rest (25% of original size), and Third TP will close all the rest. On top of that, I also want the ability to specify initial lot size and multiplier in the input window. So that the EA will work in this way: when there is a buy/sell arrow from the indicator, the EA execute the trade with initial lot size, with specified TPs and SL. If the SL is hit, the EA will wait for the next buy/sell arrow to execute trade, this time with the previous lot size times the multiplier, with TP and SL. And when the Third TP is hit or I manually close the trade, the next trade's lot size will resume the initial lot size. And when the indicator provides a buy/sell signal and trade has been executed, but before either TP or SL is hit, the indicator provides an opposite signal, then the EA will close the current one and open a new one according to the new signal. If this trade is closed with profit, then the lot size remains the same; if this trade closed with loss, then the new order's lot size will be current lot size times the multiplier. One last thing, regarding the Inputs window, I would like the EA's input window to have what I mentioned above (Initial Size, Multiplier, TP1, TP2, TP3, SL) plus all the parameters in the indicator's input window.
If possible, please provide a little comment on the function of each part in the EA's *mq4 file. I am learning in progress.
Thank you for your attention.