[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 476
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 are going through bars from the current time to the past time.
The array is searched until the last one.
Therefore, all variables will give values for the most recent case (in this case -- long ago).
Therefore, you need to do a lookup from the past to the present.
And the variablesint fd, fu,Fd, Fu;
declare at the top level, i.e. before Start and Init.
And there is no need to zero them at Start. Leave zeroing only at the place where you have them zeroed
First, OrderSend() occurs 2 times there, and both times outside the condition you specified.
Secondly, non-normalized price is passed to OrderSend().
Third, analyze the result returned by the OrderSend() function, write a message to the log in case of errors when opening/modifying/closing the order and analyze the log.
Can someone post the corrected version of Experrement 1?
Good afternoon!
Thank you for your replies - you have been very helpful ))))
Guys! The Expert Advisor makes trades when the two muwings cross. And when they cross back, it closes trades and opens in the opposite direction, losing profits.
1. How do I write that it closes deals when the lines have just started converging? And it would not open a new deal in the same direction, but waited until they cross in the opposite direction?
2. or closing a trade when r.c.i. crosses the 80 level downwards on buy, and the 20 level downwards on sell. and when closing a trade, when conditions are met, it would not open a trade in the same direction, but wait for them to cross in the opposite direction?
If there are any similar threads on the forum, please give me a link!
Many thanks in advance!
Have a nice trade!
Profitable trades!
Hello all!
Please tell me what this means:
Order buy ...... failed [Trade timeout]
Specifically interested in what this timeout is
Good afternoon!
Thank you for your replies - you have been very helpful ))))
Guys! The Expert Advisor makes trades when the two muwings cross. And when they cross back, it closes trades and opens in the opposite direction, losing profits.
1. How do I write that it closes deals when the lines have just started converging? And it would not open a new deal in the same direction, but waited until they cross in the opposite direction?
2. or closing a trade when r.c.i. crosses the 80 level downwards on buy, and the 20 level downwards on sell. and when closing a trade, when conditions are met, it would not open a trade in the same direction, but wait for them to cross in the opposite direction?
If there are any similar threads on the forum, please give me a link!
Many thanks in advance!
Have a nice trade!
Profitable trades!
https://www.mql5.com/ru/code has a warehouse full of similar ones
First, OrderSend() occurs 2 times there and both times outside the condition you specified.
I don't want to be a pain in the ass, however.
Explain to me how an order will open if OrderTotal() is zero.
Thank you.
Please tell me which code should be written in the EA to make the EA trade only once an hour
e.g., the EA has triggered, an order is opened (not interested in further), I would like the order not to open on the current bar on hourly timeframe
everything looks something like this
int hh;
int CurrentHour;
CurrentHour=TimeHour(TimeCurrent());
if (CurrentHour!=hh)
{
OrderSend(Symbol(),OP_BUY,0.01,Ask,3,Bid-3*Point,Bid+3*Point);
hh=TimeHour(TimeCurrent());
}
but I have countless orders open