Variables basics
-
Hi
I´m new at FXDreema and really love it! so thank you!
But I do have a issue about creating variables. I cant make it work..
I would like the EA to know how much I have bought in total (current), and then sell the same total lotsize.
In the tester I´m getting the message "...Alert: You want to trade 0.0 lot, but your broker´s minimum is 0.01 lot..."
I will try ta share my project (part of). As yo can see, I´m buying 0,02, and I want the EA to sell 0,02, but it wont.
I have read a lot of threads in the forum, "how to" and your instructions but I´m still struggling with it. I have also searched in youtube with no result that solved my problem.Project: https://fxdreema.com/shared/JnbdigEWd
I don´t think this is a big problem, just that I don´t get the basics about Variables.
As you can see in the shared project it is not finished. But it is this variables that´s giving me a headache

Best regards
Tommy -
@tommy78
Hi,
delete block 6 and replace it with a "Pass" block. i think your problem is that the EA in your case is waiting for a sell trade to open before modifying the variable.p.s. the "pass" block is only these because a single not connected block will not run on its own.
-
Block 6 is necessary for block 7 to work properly. However it's looking for sells only wheras it should look for buys too.
-
Thank you both q8carpenter and l'andorrà!
Replacing block #6 with a "pass" did unfortunately not solve my problem as l'andorrà wrote.
In the project I shared with you it did work when I changed the value from "sell" to "buy". But in the original project it still does not work. I´ll share my project here: (https://fxdreema.com/shared/yMnq4lAqe)
In the project I´m working with groupnumbers due to I need to separate buys from sells later onBest regards
Tommy -
-
@tommy78
Honestly I don't remember ever using group of trades blocks so I'm not that familiar with them. but as I'm trying to follow your blocks, it seems to me that since the sell block needs a variable to work, and the variable requires block 9 to have been run, and the conditions of block 5 and 29 are the opposite, then it will not work.I may be complicating things but I think that you may need to connect block 9 after 3
-
Personally I wouldn't use any block of bucket of trades. You can work smoothly with group numbers. Apparently all your blocks are working with just one group (number 1). Just remove them and substitute them by the pertinent blocks properlyh identified with the group numbers.