Build a Strategy from Rules
For closes 98, 101, 103, 99, 96, assemble one long-only trade. Enter on the first close above 100 and exit on the first close below 100. For arithmetic here, use the quoted close as the simulated fill.
For closes 98, 101, 103, 99, 96, assemble one long-only trade. Enter on the first close above 100 and exit on the first close below 100. For arithmetic here, use the quoted close as the simulated fill.
entry = first(close > 100)
exit = first_after_entry(close < 100)