Please search before you post!
The checks a trading robot must pass before publication in the Market
MetaQuotes, 2016.08.01 09:30
Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.Forum on trading, automated trading systems and testing trading strategies
getting error "Invalid Price Length 13" when placing an order
Fernando Carreiro, 2023.06.17 23:15
Also pay attention to the following ... courtesy of Vladimir Karputov
Forum on trading, automated trading systems and testing trading strategies
Tick size vs Point(), can be a little tricky in Multicurrency EA
Fernando Carreiro, 2022.03.09 12:11
Tick Size and Point Size can be very different especially on stocks and other symbols besides forex.
Always use Tick Size to adjust and align your prices, not the point size. In essence, make sure that your price quotes, are properly aligned to the Tick size (see following examples).
... double tickSize = SymbolInfoDouble( _Symbol, SYMBOL_TRADE_TICK_SIZE ); ... double normalised_price = round( price / tick_size ) * tick_size; ... // Or use a function double Round2Ticksize( double price ) { double tick_size = SymbolInfoDouble( _Symbol, SYMBOL_TRADE_TICK_SIZE ); return( round( price / tick_size ) * tick_size ); };
We are unable to see your full code, so we are unable to answer that.
For the "Instant Execution Policy", you always have to provide the price, as well as deviation if you want to control your re-quotes.
And remember that a Buy order opens at the Ask price, and a Sell order opens at the Bid price.
Just because your EA works in your environment, does not mean that it will pass the quality control of the validation process.
The validation process needs to make sure your EA will function correctly in other environments and with different contract specifications.
The users that will buy the product will certainly not have the same conditions as you.
We are unable to see your full code, so we are unable to answer that.
For the "Instant Execution Policy", you always have to provide the price, as well as deviation if you want to control your re-quotes.
And remember that a Buy order opens at the Ask price, and a Sell order opens at the Bid price.
Please, don't think only my poor knowledge fault easily.
This is an example of the part that executes a buy market order.
request.action = TRADE_ACTION_DEAL; request.price = SymbolInfoDouble(_Symbol,SYMBOL_ASK); request.sl = ask_stpls; request.tp = ask_tkprft; request.symbol = _Symbol; request.volume = Lot; request.magic = EA_Magic; request.type = ORDER_TYPE_BUY; request.type_filling = ORDER_FILLING_FOK; request.deviation=50; //--- send order bool sent = OrderSend(mrequest,mresult);
Pls, look at 2nd line.
I can't get the Ask price from this function.
request.price = SymbolInfoDouble(_Symbol,SYMBOL_ASK);
Should I think this is a problem with other parts of my code?
look at error messages again.
I can't find any information to fix this problem in The checks a trading robot must pass before publication in the Market
I tried to setting this to BID instead of ASK.(by BUY order)
request.price = SymbolInfoDouble(_Symbol,SYMBOL_BID);
So, Of course no transaction will take place.
I can understand about this result.I know.
However, the error message clearly changed.
just only one.
An error has occurred due to specifying the BID price in the buy order.
From this, it can be inferred that the BID price has been obtained.
"SymbolInfoDouble(Symbol(), SYMBOL_BID) " is looks working.
so, Why does "SymbolInfoDouble(Symbol(), SYMBOL_ASK) " become zero?
Can't this be considered a bug in the validator?
I just want help....
- www.mql5.com
I could solved it.
Thank you Fernando.
- 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, Im getting Invalid Price error in Validation to publish my EA.
Looking at this it looks like it's not getting the price.
My code regarding the order is below.
In fact, it is working normally in backtests and real trades.
Pls, somebody help me.