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
if they are ECN try to send order with TP = 0 and SL = 0, you can add it later.
You can open Pending orders with price Ask+MarketInfo(Symb,MODE_STOPLEVEL)*Point, not just "Ask". Please read this information
https://book.mql4.com/trading/ordersend -> Placing Pending Orders
Ok, so still having issues with this Error #130.
I have a demo account with GFT, and after many conversations with them, they believe that they do not set a MODE_STOPLEVEL & MODE_FREEZELEVEL, these are up to us to set?!? (I thought that they set those rates/levels???).
1. So I can only assume, that my result of 0.0 from the MODE_FREEZELEVEL is correct.
2. Anyway, these S/L & T/P are quite a way from the current price, ~30 pips or so.
3. GFT say they are a market maker, so I should not have to normalize (from what I can understand). So where else could the problem be??
4. I am getting the error on every order, be it buy or sell, however if I make them pending, then it places them.
So does anyone have ideas??? ( I am very new to this, so constructive feedback helps!)
1. do not assume . . . it will take you a couple of minutes to determine what the Freezelevel and Stoplevel are . . . print them to the log or use Comment to print them to screen, you can get them using MarketInfo() and MODE_FREEZELEVEL & MODE_STOPLEVEL . . . . when you output the values using Comment did you also use DoubleToStr() to output 5 digits ? 4 digits is the default.
2. "quite a way" ? is that enough when you consider the requirements in this article ? Requirements and Limitations in Making Trades you did read it and understand it ?
3. if you are using a price value such as Bid, Ask, Open, Close, etc . . you DO NOT EVER need to Normalise . . .
4. this is typically of what happens when a Market Order is sent to an ECN Broker with SL & TP set.
They are a Market Maker.
Please show the error information that you print to the log when you get an error 130, including OrderType, Bid, Ask, your attempted Open price, the SL & TP, FreezeLevl and StopLevel . . . and all to a resolution of Digits using DoubleToStr()
1. do not assume . . . it will take you a couple of minutes to determine what the Freezelevel and Stoplevel are . . . print them to the log or use Comment to print them to screen, you can get them using MarketInfo() and MODE_FREEZELEVEL & MODE_STOPLEVEL . . . . when you output the values using Comment did you also use DoubleToStr() to output 5 digits ? 4 digits is the default.
2. "quite a way" ? is that enough when you consider the requirements in this article ? Requirements and Limitations in Making Trades you did read it and understand it ?
3. if you are using a price value such as Bid, Ask, Open, Close, etc . . you DO NOT EVER need to Normalise . . .
4. this is typically of what happens when a Market Order is sent to an ECN Broker with SL & TP set.
Ok, so I rang GFT and they said that the basically have no idea. Helpful no? And the result that I am receiving on the comment is 0.00000. So I can only but assume/believe that the Stoplevel and freezelevel are zero, as I said, GFT had no clue.
Considering these are zero, I should not have an issue with the Requiremtns and Limitations in making Trades link that you posted.
And GFT have told me they are a Marker Maker, rather than an ECN, so I should be able to set a SL and TP
The most confusing part, is that it will sometimes place buy & sell trades, while at times placing only one, rather than both, or neither at all. There seems to be no pattern or anything.
Then, making them pending, they are placed. Setting the SL and TP to zero, does not seem to make much difference.
As I am new to coding, this is very very confusing. Any further ideas? I have placed the code below in its current form, for whoever would like to have a look. I just placed it on a chart then, and got error #130 for both the sell limit and buy stop.
I have also told the EA to print the levels at which it is attempting to place the trade. At the moment I have set the Sell SL and TP to 0 and it is placing the order fine. I have set the Buy with a SL and TP as you can see below and it will not go through. What is going on here, Im almost at my witts end!!!!
I have also told the EA to print the levels at which it is attempting to place the trade. At the moment I have set the Sell SL and TP to 0 and it is placing the order fine. I have set the Buy with a SL and TP as you can see below and it will not go through. What is going on here, Im almost at my witts end!!!!
So you have the following information:
This suggests that your Broker is an ECN type Broker, so you need to place the Order with SL & TP set at 0.0 and then do an OrderModify() to set the TP & SL, see the link I gave previously: ECN
Also, when you Print double variables please make sure you . . . . "and all to a resolution of Digits using DoubleToStr()" otherwise yo are missing the last digit on 5 digit pairs.
Also, when you Print double variables please make sure you . . . . "and all to a resolution of Digits using DoubleToStr()" otherwise yo are missing the last digit on 5 digit pairs.