Improved close price accuracy by changing trade close price level for time barrier and dynamic barrier.
Previously the close price was the trigger period close price: for time barrier is the close price at the expiration time and for dynamic barrier is the close price at the period the condition is met.
Now for both cases, the trade close price is the open price next period after the triggering one.
The reason is that the close orders will be sent right after the trigger bar close price is received so the closing order will most probably be filled at next period open price and that price could eventually be affected by gaps, situation that was not considered in the previous logic.