[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 232
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
Dmido писал(а) >>
Good day)
I am coming back to you with a question. I avoided it for a long time due to my lack of understanding of pending orders in EAs, but finally I got stuck. I do not understand how to set price in pending order. What should I add instead of BID and ASK? Can I use any variable calculated before that? Then, how should I set this price so that it would pass later, when placing an order? I get a lot of errors saying that there is no such a price and so on.....
If you do not mind, you may explain your answer in code... All I searched so much, but it says so sideways...(((
In the quality of values Ask and Bid on idea should act the current values of Ask and Bid, or variables calculated earlier.
There is one peculiarity here: you can take these values as real ones only for Buy and Sell orders.
The best thing is to make the opening of all orders in the form of at least 6 procedures, i.e: OrderSendBuy, OrderSendSell, OrderSendLimitBuy, OrderSendLimitSell, OrderSendStopBuy and OrderSendStopSell.
PS
It should be noted that limit orders are opened at the best price (with an indent from the current price by a certain number of points), and stop orders are placed in the opposite direction above or below the current price.
Example of an opening code from the market:
Example code for setting a pending order:
Hello.
I am testing an EA.
I am getting mismatch errors. Is there any way to avoid them? I don't understand if this is a large or small number of errors. The scale is predominantly green and dark green, but only about 20% full. And the simulation quality is n/a - is that a problem?
Maybe I shouldn't even pay attention, I just don't understand ...
Thanks in advance.
Hello.
I am testing an EA.
I am getting mismatch errors. Is there any way to avoid them? I don't understand if this is a large or small number of errors. The scale is predominantly green and dark green, but only about 20% full. And the simulation quality is n/a - is that a problem?
Maybe I shouldn't even pay attention, I just don't understand ...
Thanks in advance.
I don't know I personally never bother with such things (as I almost always test strategies without visualization).
Here is what I got on Jew D1 with a similar testing period
Attempt #1: bars in history - 1302 ticks simulated - 4313293 Quality of simulation - 50.00%
Attempt #2: Bars in history - 1303 Modelled ticks - 4323442 Modelling quality - 50.00%
Chart mismatch errors - 0.
Don't know I personally never bother with such things (as I almost always test strategies without visualisation).
Here is what I got on Jew D1 with a similar testing period
Attempt #1: bars in history - 1302 ticks simulated - 4313293 Quality of simulation - 50.00%
Try #2: History: 1303 bars - 1303 ticks simulated - 4323442 Modeling quality - 50.00%
Error of chart mismatch - 0.
Thank you.
I am thinking now that MT automatically fills the last 512 bars and fills the rest .... I don't know how to say it exactly. My Expert Advisor is a trend one and the distance is important to me. 512 bars is not too much.
As for the other symbols, it can be downloaded from a separate site and downloaded later?
I thank you.
Good afternoon, dear friends.
I've been dumb lately, maybe it's the weather.
Can you please tell me how to declare a one-dimensional array (in an indicator), if the number of elements of the array is set by an external variable.
Thank you.
Hello.
I am testing an EA.
I am getting mismatch errors. Is there any way to avoid them? I don't understand if this is a large or small number of errors. The scale is predominantly green and dark green, but only about 20% full. And the simulation quality is n/a - is that a problem?
Maybe I shouldn't even pay attention, I just don't understand ...
Thanks in advance.
My below IMHO, but being quotes- please correct me if I'm wrong:
The point is that Close 59th minute, Close 45th minute on M15, Close 30th minute on M30 and Close on H1 may NOT coincide.
To coincide, you need to kill your own history, by downloading the history from the server of quotes for a smaller period
and recalculate all timeframes using the downloaded history.
In this case, the real Close on different timeframes may also not coincide.
In other words, you should take the smaller timeframe and read the values of the larger timeframe with your HAND.
Good afternoon, dear friends.
I've been dumb lately, maybe it's the weather.
Can you please tell me how to declare a one-dimensional array (in an indicator), if the number of elements of the array is set by an external variable.
Thank you.
int y[];
extern int blah-blah = 100;
init() {
ArrayResize(y, blah-blah);
}
My below IMHO, but being quotes, please correct me if I'm wrong:
The fact is that Close 59th minute, Close 45th on M15, Close 30th on M30 and Close on H1 may NOT match.
To coincide, you need to kill your own history, by downloading history from the server of quotes for a smaller period
and recalculate all timeframes using the downloaded history.
In this case, the real Close on different timeframes may also not coincide.
That is, in a good way, you should take the smaller timeframe and read the values of the larger timeframe.
О! Hands!!!
Thanks for the answer. But judging from the first part, I understand that the errors are not critical for me. Thanks a lot for explaining the mechanism of these errors.
at the very top:
I'm struggling specifically with these flags, can anyone take a fresh look?
-----------------
and there's also a problem with the EA code:
it's not trading! Maybe someone will have a fresh look at it.
decided to stupid as soon as the 100 (-100) goes to trade!
I attach EA!