dac69: i need it to see 2nd last candle and open pending order 10 pips above the closing of that candle, with SL -80 pips, TP +60 pips.
- You pass the current Bid as price to your function. A buyStop must be above the Ask.
- You pass 80 as a stop loss, but the value passed to OrderSend must be a price (like you do with the take proft).
- You would know these two, had you checked your return codes: What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
- Where are you looking for the "2nd last candle?" learn
to code it, or pay someone.
We're not going to code it FOR you.
We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hello
im new at this programming mql4
i want to create a simple script, can someone help me?
i need it to
see 2nd last candle and open pending order 10 pips above the closing of that candle, with SL -80 pips, TP +60 pips.
I have this code and it doesnt do anything
can someone help me?