If i use a for loop in custom mql code block will the for loop first complete the loop and then move on to the next connected block ? or will it execute the next connected block on every run (iteration) of for loop ?
Posts made by Zackry
-
how does the "for loop" work inside of custom mql block?posted in Questions & Answers
-
RE: Converter Isnt working correctly even tho there arent any errorsposted in Questions & Answers
@johann-0 yeah gonna try that but there isnt much hope for me
-
RE: Converter Isnt working correctly even tho there arent any errorsposted in Questions & Answers
@l-andorrà I was kinda hoping i could find a solution , but i guess there is no way unless i know programming
-
Converter Isnt working correctly even tho there arent any errorsposted in Questions & Answers
I tried to convert an mt4 EA to mt5 EA and the results seems to be polar opposite
there were few errors in the generated mq5 file when i converted it , and somehow I fixed those errors , But when i ran a backtest on GBPUSD from APRIL 1 to APRIL 30 and the results are totally different from each other
also in the live market test , mt5 EA didnt opened some of the trades that the mt4 EA opened , is this normal ?
these are the mt4 and mt5 EAs: MT5 EA1_1620212345618_1.mq5 -----and mt4 EA 0_1620212345614_1.mq4i tried to find out the issue thats causing this but no luck , however i did see this in the mt5 Experts tab :

can someone please help in this matter ?
-
Check Unrealized loss of all trades in pips not workingposted in Questions & Answers
i am trying to close all running trades from current chart if unrealized loss in pips for combined trades reaches 50 pips , but the block isnt working correctly for some reason , and it didnt closed the trades on 50 pips combined loss and instead trades were closed because of some other condition in the EA , 3 trades marked in the photo are closed because of indicator giving sell entry so it closed the trades , but right before closing , the total unrealized loss in pips was 92 pips , where as i set it to close the trades on -50 pips unrealized loss as total sum
here is how i am using the unrealized profit block : https://fxdreema.com/shared/Eona3uxkd
i even tried using it with the block bucket of trades but still didnt work

-
RE: Ea Prints 0 instead of printing negative value?posted in Questions & Answers
it was a stupid mistake , i was using the formula block and the check profit block in OnTick tab and since market is close formula block wont get executed and the printing block was in OnTimer block , which was printing the default value stored in variable
-
RE: Ea Prints 0 instead of printing negative value?posted in Questions & Answers
@miki 0-1? do you mean 0-50 (50 being the value that i want to turn into negative value?)
-
Ea Prints 0 instead of printing negative value?posted in Questions & Answers
i am trying to close all running trades from current chart if loss (specific symbol loss) exceeds a certain amount of pips.
so i did this in order to get negative value of SL and used it in the Check profit unrealized block :

the constant SL value is 50 and i am printing the variable sll value on every second in OnTimer Tab, So according to my understanding the printed sll value should be -50 but it prints 0 .
-
"Pips away from open price" block but reverse of the "Trading Model"posted in Questions & Answers
Pips away from the open price has 3 different direction modes
but I was wondering if there is a way to get the reverse of the first option "trading model"i am trying to open a new trade when a trade trade is in 10 pips loss , and the block "Pips away from open price" doesnt seem to have an option for negative direction
-
What does these warnings mean while loading the ea ?posted in Questions & Answers
i am getting these warnings when i load the ea to chart , when i normally attach the ea to chart no warnings , but when i save a template with the ea attach ,it sometimes give these warnings and remove the ea from the chart automatically , and sometimes it does not give these warning when i save the template while ea attached to chart , but when i load that template it gives these warnings

-
RE: close a certain trade when its Profit reaches same number of pips as its Stoploss?posted in Questions & Answers
@cpbonzo you are right , i missed that block before , thanks
-
RE: a question about "For each trade" Block's loop ?posted in Questions & Answers
@l-andorrà yeah i am still testing... but by the looks of it it doesnt consider
trades individually -
RE: close a certain trade when its Profit reaches same number of pips as its Stoploss?posted in Questions & Answers
yes i have tried and it doesnt work like i indented it to ,let say there are 4 trades open and only one of those trades (first trade) is at the same pips profit as its sl , so as per my understanding it should close only the first trade , but it seems to be closing all 4 trades
-
a question about "For each trade" Block's loop ?posted in Questions & Answers
I am a bit confused about the for each trade block's loop
i know it loops through the trades , and then each individual trade is processed using the blocks from the loop for trades and order category
but what if there is a for each trade block (lets call it block 1) and then the next block after the for each trade block is a condition block or any other block that isnt using the option "(in loop) tade/orders in loop" option , and say its a simple condition block (lets call it block 2) of comparing the value of 2 indicators , and then the next block (lets call it block 3) is from loop for trades and order category.
will the loop execute to block 3 for each individual trade ? ?
-
RE: close a certain trade when its Profit reaches same number of pips as its Stoploss?posted in Questions & Answers
@jsauter86 i dont think it will work since it wont take individual trades into consideration
-
RE: close a certain trade when its Profit reaches same number of pips as its Stoploss?posted in Questions & Answers
@l-andorrà yep its not working for some reason , are you positive this is the correct implementation ?
-
close a certain trade when its Profit reaches same number of pips as its Stoploss?posted in Questions & Answers
let suppose EA opens up Multiple Trades across multiple different pairs and now i want it to close the trades which have the same pips profit as its stoploss .....
Is this the right way to do it :

-
RE: BUG: Block Apply Template, applies template and then erases the EA itselfposted in Bug Reports
@ambrogio i think they can work together (if i am not mistaken , since its been a long time i last work with it ), if the template is save with the ea attached to the chart it should work , cuz if its attached and when the template is reloaded then it will automatically load the ea as well , and if template is saved without the ea in the template then it wont load the ea once the template is loaded
-
RE: BUG: Block Apply Template, applies template and then erases the EA itselfposted in Bug Reports
@lucivuur said in BUG: Block Apply Template, applies template and then erases the EA itself:
This "logical mistake" looks like a bug to me
then you would need to look a bit more closer , cuz its simply user's fault of not knowing how this particular feature works , one can not blame ones own lack of knowledge on someone else
block works exactly as it suppose to work , saying otherwise doesnt make any sense
other option would be to ask Metaquotes to change how their platform works, you can try....cuz its metatrader function (template load) cuz if you manually load a template which does not have the ea attached to the chart then the ea will not magically appear after you load the template , you will need to save the template with ea attached to the chart if you want the ea to be attached after template load
-
RE: Check id a trade with certain comment exists ?posted in Questions & Answers
@l-andorrà hahahahahahaha nope i didnt tried that before and now that i tried to do it , it doesnt seem to work like that