Variable versioning across different pairs
-
If I have a variable, A and has a started value of 0.
In Pair A, the number has been updated to 5.
In pair B, would it see the number 5 too or will be have 0?
-
@xlestergg This depends on the conditions set, if you put a shared link here then this can be answered.
-
@jstap https://fxdreema.com/shared/LqHkA8Djc, not too sure what you looking for in the link, but lets say for example EURUSD passed the condition and went in a trade, and the variable would be set as true.
If the variable wasnt changed by any other things, what would another pair, AUDNZD see the variable "a" as? Does it share the variable and see it as true? Or does it have it's own version which is false as it has not entered any trades?
-
@xlestergg What I mean by shared link is your fx project link so what has been done and what isn't right can be assessed. If the condition is met by the EA that is on 1 chart then will work regardless of asset (providing trades are placed from the 1), if more than 1 EA and on different chart you would need to use terminal variables (global variables), this will mark the platform so different EA's can read.
-
@jstap https://fxdreema.com/shared/APgSjaSQd here's a better example. I want to limit my re-entry trades for each pair. For example if EURUSD has re-entered 3 times, and I do not want it to re-enter.
But for another pair, AUDNZD if it uses the same value as EURUSD (which is currently 3) it will not re-enter.
So what I want to make sure is, does AUDNZD sees 3 or does it see 0 (assuming it's default value has not changed) ?
In my case, I would want it to see 0, as AUDNZD has not re-entered any trades.
-
@xlestergg Is this the whole project? I don't see any specfic limitation to determine what symbols are considered or not. Apparently both purple are searching for 'any symbol', but that doesn't stop necessarily new trades to be open unless the variable is stopping them to do.
-
@xlestergg For each pair you need to set up a variable condition to add on each trade, then check the number before buying/selling and reset this number when your conditions are met.
-
@l-andorrà yes, as I want to do this condition checking on every pair. I'm want a re-entry limit (specific to each currency pair) on every pair which I trade
-
@jstap I see, so the values are shared after all, so from what you said I need one variable for every single pair I trade, such as one for EURUSD, one for AUZNZD and so on. Does seem a bit repetitive if I trade 20+ pairs
-
@xlestergg They are added in the same EA, if you have separate trees for each pair then these values will need to be calculated separately, using custom code getting values for each pair is possible, I just don't know how. By adding to a separate chart it will be pair specific but all done by just adding, if you want something like maximum trades regardless of pair this can be done from 1 block.