VARIABLE AS A DECISION (YES OR NO)
-

variables and constant as a decision making for yes or no...i cant make it work...how will i do this...
-
@mariojr Type is bool, value is true/false.
-
i have tried it already and it doesnt work.
-
@mariojr It does, add a shared link
-

-
shared/xehjdCfoc
-
-
@mariojr In the image all of your variables are double type variables. Also Yes No is string type, that's not boolean. You are checking as a boolean but the variable is a double, with string input :). You can also just compare as numbers: If trade... some variable < double variable or constant so you can define as you wish as an input (the nr of trades)... close trades.
Edit: So just to be clear: you want: if the nr of trades is bigger than a nr. (constant) then close trades? Then maybe instead of that some variable you can use the bucket of trades block, but I'm not familiar with that. -
@jstap please check my reply and please can you give me a sample and post the screenshot for my guidance...
-
@mariojr No mate, I don't create EA's for people, I have told you how to use, type is a bool not a double, if you want to use double, use numbers like 1 & 2..
bool==true/false
double==number with a decimal
int==whole number
color==colourthere are more but you get the point
-
ok thanks a lot...
-
@l-andorrà can you help me with this...
-
@cpxiom thanks a lot...
can you make a sample screenshot for this...
-
@mariojr I don't really understand what you want to achieve. If it's about bucket of trades, I'm not familiar with that. I did notice that you misused the variables, so I wrote.
-
no its not about bucket of trades.
how to use variables with a yes or no answer from constant. -
@mariojr YES and NO are string variables/constants. Where it writes double(under Type), change that to string. Constants are used so you can input parameters when you load the EA, and variables can be calculated, reach to their value... after a set of conditions. Then for example,

For the boolean (this is an alternative), you make a variable of type bool, then condition block with your conditions > modify variables block, where you set your bool to true or false,

then... in another tree... whith a condition block you check if your conditions are met.... meaning true or false.

-
@cpxiom now i see where my confusion is coming from...i should put on the type for boolean is bool and for text is string...i was mislead by the wording in this picture..

-
thanks to you...