if there is no tick there is no volume in the market
no volume in the market == no execution of an order
raw and very basic example
if there is no tick there is no volume in the market
no volume in the market == no execution of an order
raw and very basic example
no you need to bring them in the on tick section
To be able to help you I need the ea and the indicator to see how all things work alone and how to combine them
without seeing what you did nobody can help you...
@avrahambr said in Condition:
Hi beatking!
I looked at it and didn't succeed to understand. Seems that i will have to learn it better. Where can i learn it?
Avraham
whats causing you troubles?
so you would need to go with a custom code:
close a certain chart id (with the ea attached) if equity is below xy
you have a wrong numbering of blocks anyway and this will not work as you wish since the structure is completely wrong at my point of view...
if you share a copy there might be someone who structures this for you...
@halunek23
no on tick !!
since there can be no tick at a single unique moment
@fxdreema said in loop for objects:
You know what, I just saw that there is a property OBJPROP_CREATETIME for the objects. I don't know since when this property exists, but I really see it for the first time now. I think I can do something with it, because at the moment the situation is not very good.
So, how it works now. By default MQL sorts objects by name. ObjectsTotal() gives us the number of objects, but then when we start to load them one after another we see that they are sorted by name, not by time of creation. That's why in "For each Object" you can see A-Z and Z-A sorting methods.
And this type of sorting works in theory, because object names are normally made out of some text (prefix) + unique number at the end. And because that unique number for each next object is +1 from the number of the previous object, as a result you kinda have sorting by time.
But there is one ugly problem. Let's say you have objects with names Arrow 1, Arrow 2 and Arrow 10. What you think is "Okay, they will be sorted like this - 1, 2 and 10". But no, they will be sorted like this - 1, 10 and 2 at the end. That's why it's better to work with names that have bigger numbers.
It will probably be also ugly if I decide to put that property OBJPROP_CREATETIME into the game. Because then I will need to first get the creation time of all objects, put all these times in some array, sort that array and start picking objects out of that array. Which will make everything much slower. I didn't tested it and I don't know how much slower, but it will be slower.
is there any update on this issue? or is there another way to get the newest, since i am still struggling with the names, an option to get the newest object will be a lot better! or is there a way with a custom code to get around ?
thank you very much for your answer!!
@fxdreema
it does appear with other mt5 eas as well and there are also some other functions not working proberly i think (some time filters, show strange options and the oninit doesnt work as expected)..

i attach a picture of the time filters...
i do get this error 503 saying critical error ontick function sometimes when using an ea on mt5...
any idea where this comes from or how to solve this issue?
Hello guys,
i need help with this thing please:
i want to load an indicator to a chart when i attach the ea to a chart (oninit).
Any ideas how to do this? Because i dont find any function and also with custom code i dont have any look so far ;/
thx for your help!
It seems that the function apply template doenst work on my MT5 plattform? any tips are welcome how to get the ea to load an template oninit, thank you very much in advance!!
if you are referring to this post:
i know how to get the same result faster:

I am looking for an easy way to get the last candle id when an indicators buffer wasn't empty or zero. my easiest way i could think of is the following, but im not sure if it isnt to slow and how to stop the loop after the first candle id that meets the condition (buffer value != 0)
hey guys me again,
this time i try to figure out how i can get the last candle id from an custom indicators buffer was not empty (0)?
i know i could bring up 400-500 conditions that search for the last candle id, but i think there should be a quicker way?
any suggestions are very welcome
thx guys
how can i loop for the newest object? i already set up a loop but it always shows a random item, but i just want to loop for the newest.
Thank you very much for your help on this one 
thx for your input, but the basic logic with the percentage calculation was right or?
so it means that if the price is 1.11 it is 100% of tp and at 1.09 it is 100% of sl ?