Basic buy script

 

I know there is probably loads out there but i dont seem to be able to find them. Im quite new to metatrader and also to MQL im trying work out how to just write a script that i can place a buy order with a set take profit and stop loss(in pips) and i can just then assign it to a hotkey for quickness


Im looking for a script to do the same for sell


any chance somebody can help?

 
problably one of the best starting lessions when you would like to learn coding
 
zzuegg:
problably one of the best starting lessions when you would like to learn coding

Ye i have been reading through the documentation on this website and still trying to get my head around it. but was hoping there would be a script on the internet so i can look at it and try and work it out because i actually want it to work of an expert advisor eventually but need to learn to crawl before i can run.


i currently study C++ but im unable to get my MQL4 code to do anything at the moment

 

- in MT4, make sure that View - Navigator is active

- in Navigator window, click left of 'Scripts' to switch [+] to [-]

- scroll down to 'OrderSend' & single click

- Press <Enter> (or right/other-click - Modify) to open it in MetaEditor

- read

- If there's a function or something you don't understand, click on it & press F1

Reason: