Auto SL and TP

I don’t know much about EA but I do know a few things about programming so I just wanted to see if this would be possible. I want to be able to automatically set the stop loss and take profit points for each trade by pips.

Example, I click the buy button and my trade shows up with a 10 pip take profit and a 30 pip stop loss automatically input for me. Is this possible and if so does anyone have a downloadable file for it?

Thank you

Can’t speak for all brokers, but Oanda has multiple presets you can use for your trading. With the click of a button it can automatically determine lot size, profit target, stop loss, and trailing stop.

That sounds better than trying to mess with other peoples programming or worse, my own:)

I’ll try their demo, thanks.

If you still want to use MT4, you could just write a simple EA for opening trades that has your SL and TP settings hard coded.

Where would you recommend going to learn the language to use for that?

I would just look at the official documentation for mql4:

docs.mql4.com

The library is pretty small, so it isn’t too difficult to figure out what you need to. Just make sure you understand the life cycle of an EA, i.e. what functions are called when, when the EA is run or not run by MT, etc.

Excellent, thank you for the help. Hopefully you don’t get smacked for the link, you can remove it now if you want in order to avoid an warning from the mods.:smiley:

No problem. If you have any more specific questions about mql, I’ll do what I can to help.

I’m unfamiliar with the rules here - are all links off limits? The MQL documentation site certainly isn’t trying to sell anything, nor am I.

No links allowed until you have 50 posts, I did the same thing when I started. Not a big deal but it does help to keep out some of the crap. Thanks again.

If it’s to help someone out and not advertising the mods are usually ok with you typing a website out like website.com, but they don’t like it if you link it by typing the “http://” in front of it.

That’s just my observation though… I’m not a moderator. :slight_smile: