Forums ProRealTime English forum ProOrder support Highest high and highest low of previous days and of specific schedules Reply To: Highest high and highest low of previous days and of specific schedules

#85632

Flags and conditions do both may qualify either as true or false, thus easily tracked using GRAPH, the difference is that a condition is a test between two (sometimes even more) data, such as “close > close[1]” or “close CROSSES OVER Rsi[14]”, while a flag is a signal such as “flag” in this example or “daysforbidden” in some strategies when you do not want to trade or “TradeON” and so on….

In the code

“OpenDayOfWeek < 1 OR OpenDayOfWeek > 5” is the condition to be checked and you can graph it with

it will yieald a True/False logical value assigned to DAYSFORBIDDEN, which is a flag (and you can GRAPH it by itself, without having to write the longer line above), like a traffic lights, they are a flag to signal that some time has passed (the condition previously set) since it changed colour and needs to be changed again, you see the flag changing colour.

It is a common variable that may be either true or false, you can use any name, flag is just a nickname to make it easier to understand that it signals something.

“pi = 3.14” is not a flag, PI is just a common variable holding a numeric value, not a logical value.

The above code could have been written

I hope I understood what you meant.