[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 549

 

Situation:
In the chart window, the Expert Advisor creates graph objects with unique names.
Then it deletes them with ObjectDelete. Usually everything is OK - objects are deleted.
Sometimes a seemingly deleted object remains on the chart.
"Sort of deleted" means that it is not in the list of objects (right-click), but remains on the screen.
Hovering the cursor, its legal name pops up, but it's not in the list of objects...
How may this be?
And how to delete correctly?

 
artmedia70 >>:
Бардак!!! Открытые позиции каждая тралится тралом, при этом закрываются об "чужие" TP и SL... Соответственно полный разброд и шатание... Как победить?
I don't get trafficked at all when there is more than one pose... how do I defeat it ?
 

Hi all!!! I have a question:

my Expert Advisor is set to 0.01 lots.

But as my balance grows, it sets crazy lots... 10, 20 times more...

how can i decrease the number of lots ?

help in theory ))))

 
smartemiy >>:

всем дароф !! е сть вопросс:

в настройках советника стоит - 0.01 лот.

но по мере роста баланса, он ставит сумасшедшие лоты.. в 10, 20 раз больше..

как можно уменьшить число преумножения количества лотов ??

на теории помогите ))))

You need to see the code. It's most likely a % of the balance.
 
smartemiy >>:

всем дароф !! е сть вопросс:

в настройках советника стоит - 0.01 лот.

но по мере роста баланса, он ставит сумасшедшие лоты.. в 10, 20 раз больше..

как можно уменьшить число преумножения количества лотов ??

на теории помогите ))))

In theory, you should set the maximum risk for each individual trade (<=2%) and then calculate the number of lots

based on this risk. Start monitoring maximum drawdowns during optimization (<=10-20%).

And if even then crazy lots will appear (provided everything else is correct), it's probably because it's a GRAAL :)

 
Hmmm... thanks guys... we'll try to change for the better ))))
 
sllawa3 >>:
у меня ваще не тралится когда больше одной позы.. как победить ?
I think the magician should be set for all positions and tracked...
 
Gentlemen!!! What could be the reason for not opening more than one pose in one direction? There are no restrictions anywhere. I took everything out of the way. Thought it would open on every tick. but no... One position opens in one direction, the other, with a positive signal, in the other and keeps them until it closes TP or SL. As soon as he closes one position, he opens the same one... And one again... And pulls it to the last one... Why can this happen?
 
artmedia70 >>:
Господа!!! В чём может быть причина неоткрытия больше одной позы в одну сторону? Ограничений нигде нет. Поубирал ваще всё. Думал на каждом тике начнёт открываться... Ан - нет... Одну позу открывает в одну сторону, другую, при положительном сигнале, в другую и держит их пока не закроет по TP или SL. Как только закроет одну позу, открывает такую же.. И опять одну... И тянет её до последнего... Почему так может происходить?


The reason is that somewhere in the code there is a limit to the maximum number of unidirectional positions.

You are making a big mistake, trying to remake someone else's EA to suit your needs, without understanding the very logic of how that EA works. It will be much faster and less time-consuming to start making your own EA, by yourself and from scratch. At first, it will be very simple, but it will work! Then it will become more and more flexible and functional. And at this, not only there will be no glitches, because you will check every new piece of code, but also there will be clarity in how the code works. Take your word for it. Do not use other EAs, and try to make your own one.

Sometimes you may dig into somebody else's code to understand how this or that function works or how the person solved this or that task. But involving someone else's cumbersome code is a direct way for a beginner to lose control and peace.

 

artmedia70, I want to show you a simple example of what such attempts to do the code yourself can lead to.

We are sitting in Skype with a friend and chatting. We have an idea to check how the EA will work on a takeover signal. A takeover signal is when the body of the first candle is larger than the half of the body of the previous candle and they are of different colours. It turns out that the subsequent candle's tendency seems to absorb the previous candle's tendency - this is the definition we have developed for this situation. It took me about five minutes to make the code of an EA that would work by those signals. I tested it for a couple of minutes and in 7-10 minutes I sent the Expert Advisor to my friend. The obtained Expert Advisor was able not only to open orders by the signal, but also to trawl, move the stop loss to Breakeven, reset the lots at user-specified levels (the number of these levels can be set as many as necessary) and had the system of lots management.

Why, and why did I make my programmer in such a short time? It's not hard to understand - over the years of programming in MQL4 I have accumulated quite a lot of ready-made functions. I assemble the EA like a house of bricks. This is how every programmer works - in order not to have to create a code of a certain function from scratch every time, he/she combines these functions into libraries and uses the ready code.

Why am I telling you all this? I want you to understand that now an attempt to sharpen someone else's code for you will lead to lower performance. And the attempt to make an EA by yourself will end up about the same as for everyone else (with a little diligence) - you will get a lot of your own functions and it won't be a problem for you to make a relatively simple EA.

Reason: