[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 15
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Start by writing the price in the conditions in a more correct form: Close[0] (bar not closed) equals Bid. Maybe this will change something in the behavior of your indicator
When commenting on my posts you often over... I don't need it, and putting myself in the shoes of those for whom you are trying to comment, I would give it up too. There are many more revelations waiting for you on your way to mastering MQL4.
I'm sorry if something's wrong, I didn't mean to make you feel bad and I'm well aware of the fact that what I know aboutMQL4 is incomparable to what you know.
When debugging an Expert Advisor, I need to draw arrows of different colours at certain indicator values in order to see in the tester whether there were preconditions for entering the market. Can anyone provide a link for an example?
Please, look through the EA, help me to write a condition so that when the last order in the chain is closed the whole chain of orders is closed together with it, it will be easy to understand all the functions.
you formalise the wish a bit. Exactly when closing a specific order?
If not, then very simply:
at the beginning of the program
int previous_total_orders=0;
on the program body:
at the opening of a new order
previous_orders++;
check:
if (prevous_orders>OrdersTotal()) CloseAllTrades(Sym); //this function can be any of the code that closes all orders for a given symbol
If it is the last open order that is closed, then
at the beginning of the program, declare Last_ticket variable
when the order Last_ticket=OrderSend..... is opened
check:
if(OrderSelect(OrderSelect(Last_ticket,SELECT_BY_TICKET, int pool=MODE_TRADES)!=true)CloseAllTrades(Sym)
You can have a look here. I am using this principle (checking the signal code of the indicator) in the indicator itself, BUT the method can be understood (if you want to).
thanks
I link the text to the line price + 3*Point (i.e. I put it slightly higher), but still, when I change the size of the chart (window) the text is now above the line, now below, now at the line level (it jumps)... Why does this happen? - I'm kind of giving the exact price coordinate. How is it solved?
I've looked and tried how others do it, but the effect is similar there. I want to understand how this "bounce" gets rid of. And most importantly, why does it appear since the coordinates are hard: price and time?
you formalise the wish a bit. Exactly when closing a specific order?
If not, then very simply:
at the beginning of the program...
Thanks, I will try it !
( I'm trying to do a sequence of opening positions, provided price movement has gone into deficit, should open a position with a larger lot, the opening position with a larger lot should be repeated until the last position with a larger lot is closed by a stop and here we need all positions in this chain to be closed together with it)