Bar Index (barindex) of the bar at which the Nth last order was executed.

Syntax:

Example :

Exit all positions if at least 5 bars elapsed since the last trade has launched.

 

Example :

Example of a simple trading strategy using MACD crossing above and below the zero line with adding orders while the price continue to get higher with condition on number of bars since the last open.

 

Share this