Hi
I wrote the Expert for Auto trading.(mql4) It goes very well in demo account.
I tested multi times, without any problem.
BUT when i want to use it on real account, it does not working... :(
WHY?
I checked everything : SL,Tp, Slippage ,..... .
All parameters,All numbers , and ...... are true. But i do not know why is not working on Real Account.
what is wrong? slippage? Ask? bid?
which one??
Can anyone help me?
Here the code :
buyy=OrderSend(Symbol(),OP_BUY,0.01,Ask,2,Ask-5,0,"Buy",001,0,clrGreen);
- Check your return codes, and report your errors.
Don't look at GLE/LE unless you have an error. Don't just silence the compiler, it is trying to help you.
What are Function return values ? How do I use them ? - MQL4 programming forum
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles - 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.
-
You can't move stops (or pending prices) closer to the market than the minimum: MODE_STOPLEVEL * _Point or SymbolInfoInteger(SYMBOL_TRADE_STOPS_LEVEL).
Requirements and Limitations in Making Trades - Appendixes - MQL4 TutorialOn some ECN type brokers the value might be zero (broker doesn't know.) Use a minimum of two (2) PIPs.
- What is Ask? On EURUSD it would be 1.1234º and subtracting 5 would be negative. № 1, № 2, № 3.
- Check your return codes, and report your errors.
Don't look at GLE/LE unless you have an error. Don't just silence the compiler, it is trying to help you.
What are Function return values ? How do I use them ? - MQL4 programming forum
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles - 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.
-
You can't move stops (or pending prices) closer to the market than the minimum: MODE_STOPLEVEL * _Point or SymbolInfoInteger(SYMBOL_TRADE_STOPS_LEVEL).
Requirements and Limitations in Making Trades - Appendixes - MQL4 TutorialOn some ECN type brokers the value might be zero (broker doesn't know.) Use a minimum of two (2) PIPs.
- What is Ask? On EURUSD it would be 1.1234º and subtracting 5 would be negative. № 1, № 2, № 3.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi
I wrote the Expert for Auto trading.(mql4) It goes very well in demo account.
I tested multi times, without any problem.
BUT when i want to use it on real account, it does not working... :(
WHY?
I checked everything : SL,Tp, Slippage ,..... .
All parameters,All numbers , and ...... are true. But i do not know why is not working on Real Account.
what is wrong? slippage? Ask? bid?
which one??
Can anyone help me?
Here the code :