Changing Variable/Constants Names Breaks Stuff?
-
I had an EA that was working great, but I wanted to make a V2.
I imported the MQL file into the builder and named it with V2.
I decided to rename a variable (from Total Trade Risk to BaseRisk). It was used in calculations for % Risked per trade.
Once I change that, I added a bunch of stuff to the EA, but I didn't mess with the original stuff. (What I mean is, I have a criteria when my balance is at or below starting balance, keep doing the exact same thing as before. I added a new branch off of a condition that balance had increased, basically and that's where the new stuff happened). So, I left all the original stuff untouched.
It went from placing lots from 0.05-0.11 or so based on the SL and stuff.
Now? Every single trade is 0.01 lots. I've been trouble shooting for like an hour and all I can remember doing that might have affected it is renaming that constant.
Does this often break stuff? It appears the builder renamed it in all the boxes that I used it in, but for some reason...this issue is a thing.
-
@cdwilder1 yeah, sometimes the names break. I dont know about "BaseRisk", but there are certain reserved variable names in the general structure of fxdreema code - if you accidentally pick some of those reserved names, you going to have bad time
-
Oh, goodness, @roar hahaha
I added a bunch of new variables and stuff to the project, also, just not in that area. So, reverse variables? It does the opposite of what's stored in the variable or something?
I guess there's no list of these or something anywhere? My project has like 20 variables and another 20+ constants hahaha.
Thanks for the reply.