Trading View Pine Backtest Script - Day Trade based on opening 4 candles

31 Views Asked by At

general question, I'm trying to write a backtest Pine script that will sell an option based upon the first four (4) candles on the trading day - the idea here is that the option sold would end the day out of the money.

So my first question is can only the first 4 candles be used to initiate the trade and then the days close value be used to see if the trade was successful?

The second question is how would I be able to trigger the opening of the trade when the trade is technically a "sell" to start?

Concept here - so I haven't coded yet.

0

There are 0 best solutions below