need advice on using variables to select buffers of a custom indicator...
-
Hello.
i am trying to select the indicator's buffer using the variables , but there seems to be something wrong with it and its not running the block where the variables are being used to select the buffers, is it something that fxdreema dont allow ? or its some other problem in my logic?Here in Block 3 i am using the variables as the buffer names :

But the EA seems to be halting the execution at block 3 and not executing any other block after the block 3Here is the EA i am working on :
https://fxdreema.com/shared/Yg3NrL95c
https://fxdreema.com/shared/JVWB9MzYcThis is the indicator i am using :
https://www.mql5.com/en/market/product/11131The idea is to loop through all the buffers in sequence and generate alert for each and every cross (and giving the name of the currencies that crossed) ie;
AUD buffer crosses above all other buffers
then cad buffer crosses above all other buffers
chf crosses above all other buffers
.
.
.
.
.
till the last buffer usd buffer crosses all other buffersi do know there is an option to individually select the buffers and then generating alerts for every pair i i am stupid enough to actually try that but it went upto 400 blocks and it ended up 100K lines of code , which is not that feasible, so i thought maybe its possible to achieve this using a loop
Thanks in Advance
-
@zackry For once I think I can help you!
A real programmer told me that fxDreema is terrible at catching buffer info from custom indicators. The best way to do it is by using the 'iCustom' operator in a custm code. Hope it helps. 
-
@l-andorrà well i was thinking the same thing to use the iCustom function in the custom code block and then use the variable in the buffer parameter
i was just hoping to stay away from using custom code , because i get nervous when i use code
"i guess , curse of not being a programmer ;)" -
@zackry LOL

-
@l-andorrà any idea , why this isnt working ? https://fxdreema.com/shared/EpxvbhDBc
i have exhausted most of my brain cells just to find out whats wrong , but didn't find anything -
@zackry I'm afraid I cannot give you ans answer, sorry.
This project is too advanced for me. -
-
Hi @zackry!
I never use custom indicators, so don't really know their syntax limitations here..I see you increase the buffer index in a loop, maybe the number increases all the way to a non-existing index and this causes the error?
-
Hi @roar
thanks for your reply
yes you are right i was experiencing the issue of non existing buffers , so i added sort of a counter check to make sure the number do not exceed to the non existing index (not good with these dynamic things but i tried)
here it is please take a look : https://fxdreema.com/shared/JVWB9MzYcif we simply look at the blocks and the logic i think it should work ....
but there seems to be something that i am missing here , and i cant figure it out on my own due to my limited knowledge of fxdreema -
when you escape the condition 9, the ctr should be increased, otherwise the condition 3 will never be false ...

maybe there will be other things, I have not checked details ...
it is possible that the indicator is working on the timer and therefore it can caused problems in any EAjust try it in code, it is so simple although time consuming

https://fxdreema.com/shared/vcEWDohzc

here you have to fix a few things, for example if EUR crosses AUD, both will be alerted (EUR>AUD and AUD<EUR, because both are valid in for loop) ... but as I told you, there may be a problem with the indicator being recalculated (I think it is using recalculation based on timer)
or I have an error somewhere, try to debug it, I didn't try it thoroughly
-
@miro1360 Awesome , absolutely awesome

I have been trying to solve this issue for a very long time , i even tried the option of creating individual blocks for each cross and i ended up with more then 400 blocks and the resulting ea was slow as hell
Its amazing how 400 blocks can all fit into 2 custom mql blocks, you are genius **Hats off **
your code is working splendidly , and you are right about (EUR>AUD and AUD<EUR, because both are valid in for loop)
I will try and add a check before the alert code to make sure it only alerts for the currency pairs which are present in the market watch or will try and write a list of all 28 valid currency pairs , i think this can help avoid the issue of (EUR>AUD and AUD<EUR, because both are valid in for loop) since AUDEUR is not a pair so it will skip the second alert
Thank you ....... Thank you ....... Thank you ....... Thank you ....... Thank you ....... Thank you ....... Thank you ....... Thank you ....... Thank you ....... Thank you ....... Thank you ....... Thank you ....... Thank you ....... Thank you ....... for all the effort you put into writing the code
YOU are AWESOME
-
@zackry None of us will ever be grateful enough to miro.

-
@l-andorrà true that

-
PLS CAN YOU ADD MORE CONNECTIONS TO THE FREE TIER PLS MAKE IT 20 CONNECTIONS.
-
@kestra non of us can do that, only admin can
But in my opinion 10 connections are enough in free tier
If you need more connections then you can buy the full version, price for full version is more than fair..... It's nothing compared to what developers will charge for one EA -
@miro1360 Hi miro sorry to bother you again , but a question pleas ... can you please shed some light on this:

what is this portion of the code used for ?? -
this is code to round the number on a specific decimal places (set with decimals, now it is set on 2 places),
use it as is, just change the variables (curA0, ...) ... it can be omitted if you don't need rounding -
@miro1360 perfect .... thanks


I'll appreciate if you could point me to the right direction please 