Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Entry_bar: Time of a Closed Trade #540

Answered by kernc
umashgh asked this question in Q&A
Discussion options

Hi,

I am trying to access closed trades from _strategy object. The time is mentioned as entry_bar to exit_bar. How do I convert this to clock time?

Also related: Can I access the bar info in strategy.next() function? So as to backtest strategies that depend on the nth candle of the day?

You must be logged in to vote

How do I convert this to clock time?

You can use entry_bar and exit_bar as indexes into Strategy.data.index.

nth candle of the day

See #188 (comment), #502 (comment).

Replies: 1 comment

Comment options

How do I convert this to clock time?

You can use entry_bar and exit_bar as indexes into Strategy.data.index.

nth candle of the day

See #188 (comment), #502 (comment).

You must be logged in to vote
0 replies
Answer selected by umashgh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /