what exactly do you need?
Video Tutorial - Signals Dashboard EA [advanced] - looping Objects, arrays
-
Here I show you how to create own Signals Dashboard using fxDreema with few blocks using loops and arrays.
How can arrays and loops help you create project with few blocks instead of > 1000 blocks (mostly in multipair projects).Video (without voice
https://youtu.be/6wYxwRF6slw
For this tutorial very small programming knowledge is needed.
.... edit 07/2018: for some reason project is broken, custom code blocks are empty ....
MT4 original project (MT5 si probably the same logic)
0_1488659041688_Tutorial_Arrays.mq4edit: MT5 project: https://fxdreema.com/shared/ZA1quekHb
have a fun
- 2 months later
-
@miro1360
Thank you for this very well done job & tutorial on using MQL & Arrays! Very valuable. Keep up your good work!Would it be a good idea to use a vertical array for rows as well, e.g. if I would add many more indicator rows?
Sorting of Min & Max data, I believe is very useful and important to create many useful formulas, indicators & for condition/decision making -- which can be done in MQL4 using MathMax & MathMin .
E.g. your tutorial EA could mark which pair has moved Most & least today.
But how can these Math functions be utilized in FXDreema? I believe they are missing in this software, and if so they should definitely all be added, what do you think?
Meanwhile we could perhaps use a "Custom MQL code" block, or what do you think?
I tried to calculate Min & Max and store the resulting value into a variable, but nothing compiled correctly. Any ideas?
Ref: [https://docs.mql4.com/math/mathmax](link url)
-
now pairs are in rows, each row is each pair ... and you are probably asking for columns? you can add as how many columns with indicators as you wish
and with sorting you mean array sorting and than pairs sorting into pyramid?
https://docs.mql4.com/array/arraysort
it can be done, but it takes a lot of time to domaybe sometimes ....
you can use all functions in fxDreema, all functions which are in mql language and you can also create own functions (with fxdreema studio, look somewhere in forum for more details) ...
I think, these functions MathMin and MathMax are not working with arrays ... for finding min or max value from array use these functions:
https://docs.mql4.com/array/arraymaximumand special for this: "which pair has moved Most & least today"
you know, it is not as easy as said, because here in forex is something like average daily range specific for each pair, you can find, that EU pair is moving daily about 80 pips, but GJ pair is moving > 160 pips ... for this, you need talk in % of ADR, or something like this:
https://www.forexfactory.com/showthread.php?t=650418
and after that (when you have reference point for each pair), you can objective selected which currency moved most -
@miro1360
Yes, I meant Columns. I made a few extra showing different indicator values.I got the idea if we add many more columns, if we can make it a more effective code with an array somehow for the columns as well, like you said - the reason for your tutorial was to create 1000+ less blocks. Is it a good idea and how would one add another dimension array in that case?
About Max & Min sorting... I find the concept very useful, I get new ideas all the time now, where it could be very useful.
E.g. I have 3-5 MAs on the chart or even more - or some other indicators of course. I would like to know which one is the highest (MAX PRICE) and the lowest (MIN). I could then calculate the distance between them and save that result in a Variable, to know some range.
I tried the code from [https://docs.mql4.com/math/mathmax](link url) but could not get it to compile correctly. Lost of errors. And how would I store the Max / min value in variables?
I could of course create a massive amount of formula blocks and calculate all combinations, but with many indicators, this method too would get into the 1000nds of blocks.
I thought if this could be done as smart, as you have been using arrays, to reduce blocks used, to use MathMax & Min to store the value simply and immediately to a variable, as simple as that, since MQL has the function already built in. Knowing this could be very useful for many applications.
Does FXDreema not have the Math Functions built in? It should. Even VTS/iExpertAdvisor has that (but in the end, it's a useless software, where even basic functions don't work, like limiting the number of trades etc, that's why I had to dump it & fortunately found FXDreema).
MQL Math would however be very useful in FXDreema, especially for us who don't code much raw MQL code.
Do you have any idea how we could sort out the Max & min values, even if it is not in an array, but I suppose it could be?
I really loved your tutorial. It's useful. I'm going to check out more.
Interestingly, I made the same conclusion earlier about drawing the average ATR line some time ago.
I have also been thinking how to solve the problem of self adaptation, so your link was very spot on for that too.
It seems like we are very synchronized.
Big thanks to you my friend!
-
I just did for you this one example (sorting pairs and its coresponding RSI values, from max to min), where is array sorting working (it should work, I have not tested it because market is closed while posting this, but you can test it when it starts again
https://fxdreema.com/shared/sfv0yDtFnote, that here needs be done some temp values which are holding temporaly other values for further use, and some functions to handle with these values and arrays:
see, now it is even more custom code ... but question was if something like this is possible did in fxdreema and it is possible, but need some basics of mql programing ...
- 3 months later
-
Hi, this doesnΒ΄t work for MT5. Gets array error. Could you tell me which lines I have to chage it? It seems that MT5 codes are different from MT4.
-
not a lot of changes, and not even problem with array ...
https://fxdreema.com/shared/ZA1quekHb -
Funny thing. When I did on web builder it worked, but not on desktop version. Thanks anyways!!!
-
desktop is not supporting arrays ...
- 10 days later
-
Got stuck again
. I did almost everything, and some I had to change on mql5 editor, but the basics are ok. What I would like to do and canΒ΄t figured out how is to set a button on objchart to open a new chart with symbol and timeframe that I click on. Here is the full project shared/NNA81CLec
-
hope this example helps you:
https://fxdreema.com/shared/HeInsuWfe
or import this into your projects to see all variables: 0_1500932938973_testMT5_01.mq5it have few custom code blocks but result can be satisfied for you
if you are using a lot of timeframes, it can be even simplified (I mean blocks count reduced) with next loop in loop ...
-
and here is version with reduced blocks and next loop, it is bit complicated but working as well
-
Thanks miro, youΒ΄re amazing. I got it all working... There is only one more thing that would be perfect to do. Instead of manually adding pairs, is it possible that if I write the name of the pair ont the chart box that is created it auto reads it?
-
I think this can be also possible, now try this yourself, practice give you skills and post here what you found :simple_smile: ... the harder you try, the better skills you get ... when you fail, I look into that problem
- about a year later
-
@miro1360 .Hi - Do you have an example of a button in an array for mq4 please ?.
-
what exactly do you need?
-
I'm not sure if it is the way to go . i am trying to incorporate Close all Trades and a Take profit button that allows user to input a TP for all trades.
-
I think, you do not need arrays for that ...
-
@miro1360 Thank you.
-
[solved]