Value Error in DQN algorithm with custom environment

Here i am trying to create a custom environment and trying to find the lowest and highest point on chart and and find the most accurate parameters for database.
select parameters → create database in base of parameters → check the profitability of database so like how accurate are these parameters and repeat until it finds the most accurate but i am getting this error: ValueError: Error when checking input: expected input_9 to have 2 dimensions, but got array with shape (1, 1, 2)
i cannot find the source of this error.
this code is a first draft so i cannot go forward to make it better cause of this error.