But this is exactly how the example had it, so what could be wrong with the code below
Code: Select all
if high > high[1] then
isUpCloseDay = true;
Else
isUpCloseDay = false;
Code: Select all
if high > high[1] then
isUpCloseDay = true;
Else
isUpCloseDay = false;
Code: Select all
if high > high[1] then
isUpCloseDay = true
Else
isUpCloseDay = false;
I find it intuitive:Where to put the semi-colon is the most confusing part of if / then / else!
That depends I think on how someone views the `begin` and `end` statements.In some languages, the different conditional branches are separate statements whereas here, they are really just one long statement.
Code: Select all
if (High > High[1]) then
upCloseday = true
else
upCloseDay = false;
Code: Select all
if (High > High[1])
upCloseday = true
else
upCloseDay = false;
Code: Select all
if (High > High[1]) then begin
upCloseday = true;
end
else begin
upCloseDay = false;
end;
Code: Select all
if (High > High[1])
{
upCloseday = true;
}
else
{
upCloseDay = false;
}
Code: Select all
If strWhatever = "Y" Then
value1 = 1
Else
value1 = 2
End If