how to display result of a condition in comments
-
Well title says it all I believe..
I guess I have missed something (again)
Thanks for the help
-
The result of a condition is that the next block(s) run. Condition = if. If A > B, then do something. No information is saved from those if's. What is your idea?
-
I was trying to display in Comments the current trend
for example
the condition CandleClose(1)>CandleOpen(1) is trueon the commnet screen I have a message saying CURRENT TREND IS BUY
it is only cosmetics

-
A condition is something like this:
if (A > B) { do something }or
bool result = (A > B); if (result == true) { do something }or
bool result = false; if (A > B) { result = true; } if (result == true) { do something } -
If you have the Comment block after that Condition, then it is true. But you can have it before, the Comment block could run before the Condition is checked. It depends.
You can have a Variable that will be set to 0 before the condition and to 1 after. Look at the vertical "Variables" for that Condition block, there are ways to modify Variables in there.
Another way is, if you are working with the current symbol and timeframe, then if you write this somewhere:
Close[1] > Open[1]... it should return the result of that comparison, which will be true or false