I would like to access the historical & real time performance or profit factor/ratio. When right-clicking on a strategy, there is a selection for strategy performance>historical & real time performance. When this is run, it can output the performance factor/ratio seen the the second column title "performance".
Here is what I would like to do:
In my strategy code for entering a long or short position, I would like to access this ratio/factor and make it a condition for going long or short respectively.
For example, in the strategy code, I could load, say, 14 days. Then, as an additional condition, I would like to add:
if the historical & real time "performance" ratio/factor over the last 14 days (include right up to the present moment in the current day) is above 2.50 go long or short respectively.
What code could I use to access the that performance factor?
Thanks...
Comment