
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
You buy at the Ask and sell at the Bid.
Your buy order's TP/SL (or Sell Stop's/Sell Limit's entry) are triggered when the Bid / OrderClosePrice reaches it. Using the Ask±n, makes your SL shorter and your TP longer, by the spread. Don't you want the specified amount used in either direction?
Your sell order's TP/SL (or Buy Stop's/Buy Limit's entry) will be triggered when the Ask / OrderClosePrice reaches it. To trigger at a specific Bid price, add the average spread.
MODE_SPREAD (Paul) - MQL4 programming forum - Page 3 #25
The charts show Bid prices only. Turn on the Ask line to see how big the spread is (Tools → Options (control+O) → charts → Show ask line.)
Most brokers with variable spread widen considerably at end of day (5 PM ET) ± 30 minutes. My GBPJPY (OANDA) shows average spread = 26 points, but average maximum spread = 134.
I'm so sorry I thought I posted it in the expert advisors section! Won't happen again I promise
Which is the wrong section.
Anything to do with MT4 should be posted in the MQL4 and Metatrader 4 section.
Which is the wrong section.
Anything to do with MT4 should be posted in the MQL4 and Metatrader 4 section.
Also what is the styler?
https://www.metatrader5.com/en/metaeditor/help/development/styler
Could you explain why is the bottom part of code independant of the top part? Everywhere I've seen this code it has been written the same way?
Do not just copy examples of code without understanding what it is doing.
Your earlier code....
Now use the styler
Change your code using a pair of { }
and use the styler
now you can see that the complete block of code within the { } is executed only if the if condition is satisfied.