I want to access trades data of last 3 months in pine script before entering a new date , how can i do that
Asked
Active
Viewed 148 times
1 Answers
0
You can use the strategy.closedtrades
namespace. It has many properties that you can use.
Some examples you can use are:
strategy.closedtrades.entry_price
strategy.closedtrades.entry_time
strategy.closedtrades.exit_price
strategy.closedtrades.exit_time
strategy.closedtrades.profit
strategy.closedtrades.size
Otherwise you need to keep track of the trades yourself using var
variables and arrays.

vitruvius
- 15,740
- 3
- 16
- 26