Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Yes. Click on the last bar of a session. The displayed time stamp for that bar is normally the SessionEndTime. However, note that the time stamp of the first bar of a session is not the SessionStartTime, rather it is the SessionStartTime + the Bar Interval. So to find the time stamp of the first bar you could write this code:
Yes. Click on the last bar of a session. The displayed time stamp for that bar is normally the SessionEndTime. However, note that the time stamp of the first bar of a session is not the SessionStartTime, rather it is the SessionStartTime + the Bar Interval. So to find the time stamp of the first bar you could write this code:
This is the result of executing the code below using the sessionlastbar function in multichart, but I would like to get the same result in tradestation as in multichart in tradestation.
However, tradestation does not seem to have the sessionlastbar function, but as an alternative, can I use "CalcTime(SessionStartTime(0,1),BarInterval);" to get the same result? Can I get the same result?
variable:Open_(0),High_(0),low_(0),Close_(0),indBar(0),countBar(0),iSShowAllert(false);
if barstatus(1) = 2 then
begin
countBar = countBar+1;
//print(symbol,countBar );
end;
if sessionlastbar then
begin
countBar=0;
//print( date,time,countBar);
end;
if Date[1] <> Date[0] then begin
Open_ = open;
High_ = high;
low_ = low;
Close_= close;
end;
if high>High_ then begin
High_ = high;
indBar = Symbol_CurrentBar;
iSShowAllert =true;
end;
if indBar[1] +1 = indBar or indBar[1] = indBar or countBar = 2 then
begin
iSShowAllert = false;
end
else begin
iSShowAllert = true;
end;
if iSShowAllert then begin
if Open_<Close_ then
Plot1(High_,"",Cyan);
Alert ;
end;
if iSShowAllert then begin
if Open_<Close_ and Open_ = low_ or Open_ = low_+0.01 then
plot1(High_,"",yellow);
end;
if iSShowAllert then begin
if Open_>Close_ then
Plot1(High_,"",red);
end
else begin
if date<>date[1]then
NoPlot(1);
end;