Please refer to the Trade Script below. I want both the conditions to be satisfied before the BUY and SELL signal are generated. I tried but it is not working.Please rectify the trade script if required.
CROSSOVER(CLOSE,PSAR(CLOSE,0.03, 0.3)) = TRUE
CROSSOVER(PSAR(CLOSE,0.03, 0.3), CLOSE) = TRUE
I have back tested you script.
The script conditions looks good and trades were executed, using your BUY SCRIPT as entry and SELL SCRIPT as exit
You can avoid using the CLOSE argument on the PSAR function.
The sell Script of PSAR cross over cannot be used as a SHORT SELL ENTRY.
The Pi backtest engine cannot recognize the PSAR sell script crossover for entry.
Looking into the previous questions that were raised on this forum, this seems to be a bug on the Pi backtest engine.