Simulate a buy and a close order...

Miguel_Jesus  

Hi

Is it possible to take on a piece of data and simulate a buy/close order and know the profit ?

Thanks in advance