I do not pretend to be a guru coder but I think this now works as requested, I have tested briefly myself but there may still be some bugs to iron out so please test thoroughly in demo before doing anything with a real money.
To use... place a horizontal line at the price you wish on the chart and in the DESCRIPTION field put either 'start long' or 'start short' to enter a trade when the line is crossed. (As before)
The new bits... place a horizontal line at the Takeprofit price (above the line if your trigger line was for a long trade! ) for your trade and in the DESCRIPTION field put "long tp" place another horizontal line below your trade line and put in the DESCRIPTION field "long sl"' for your stoploss. You should now have three lines the first is where your trade will be triggered and the other two are for the TP and SL of that trade once it is triggered. (if it's a short trade enter "start short" for the trigger line and "short tp" and "short sl" for the SL and TP lines.
If you have a long and short trade set up you will have 6 lines on your screen that is the maximum for this ea to cope with.
The good thing is that once placed you can move these lines up and down either before or even once the trade is triggered and the SL or TP of the trade will be adjusted automatically.
When the trade completes the lines will be deleted automatically.
NOTE: You can only have one long and/or one short trade open at any one time. It's just too complicated to keep track of multiple lines and trades. If you really want multiple trades, open another window for the same currency and add more trades to that etc.
Also note that the text on the lines must be entered exactly as stated above all lowercase and spaces between words.
I have also removed all the errors/warnings it should now compile OK.
New file names, put MTB v3.mq4 in your experts folder and put MTB functions.mqh in your expert/include folder.
If your lines are too close the broker may not accept the SL/TP levels so watch out for that and also make sure the TP line is above for a long trade and below for a short trade!
I hope this all makes sense. I'm sure you will pick it up once you have a play with it.
trigger line can be a sloping trend line, use / or horiznonal line in metatrader but SL and TP must be horizontal lines.
FXdreamer, It's too early to post feedback on the latest EA, but I have 1 successful trade using new version. It's very simple to use and so far, so good. I will come back later after I have a few more trades.
I have once question. If I use line drawing indicator, i.e. "Demark Trendline" and changed the indicator's show name to 'start long' and 'start short', do you think EA will read it as order line? I understand it has to meet the rules of sloping and horizonal line...
I researched to get all the tools they had to do operations on a line.
I bought MagicStick. But I think that being a commercial program to be blocked I can not incorporate improvements according to my ideas, not very useful for me.
I tried this last file and still do not know how it works.
Spend some more time until you get to do operations.
I have few skills to code.
But I can do some things.
I found easy.mq4, easy2.mq4
It has some bugs but works well.
My proposal was to incorporate these functions v3.mq4 MTB
Manages operations trendline.
We must put: bs (BuyStop), bl (buyLimit), ss (SellStop), sl (SellLimit) in the name of the line.
And Another great advantage is that the name of the trend line and is identified quickly.
You put on a trend line and a stop loss take profit. So we can adapt to a rise or a fall. Much better than having a horizontal line. We can also leave it horizontal.
By moving these lines will adjust its value to the server.
My proposal is to incorporate these functions to file v3.mq4 MTB
If you do this and I'll be able to incorporate further improvements and will share with you all.
I think all you have to get the decompiler mq4 file from ex4.
This EA seems amazing - But I can't open Manual Trendline Break v.2 - can somebody help?
I use MT4, broker: XM.