Difference between revisions of "BarsSinceStartSession"
Jump to navigation
Jump to search
(Created page with "With the BarsSinceStartSession function the number of bars since the start of the day will be returned. == Code == <syntaxhighlight> Variables: firstBarOfSession(0); if (...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 18: | Line 18: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
− | + | Print(GetSymbolName, " - ", BarsSinceStartSession); | |
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
returns: | returns: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
− | 6E - | + | 6E - 238.00 |
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | [[Category:Functions]] |
Latest revision as of 10:50, 27 January 2012
With the BarsSinceStartSession function the number of bars since the start of the day will be returned.
Code
Variables:
firstBarOfSession(0);
if (Date <> Date[1]) then begin
firstBarOfSession = CurrentBar;
end;
BarsSinceStartSession = (CurrentBar - firstBarOfSession + 1);
Usage
Print(GetSymbolName, " - ", BarsSinceStartSession);
returns:
6E - 238.00