Help me to code this strategy

I am trying to create a BankNifty option sell strategy but of no luck. If anyone can help me out that will be great. The following is the details about the strategy that I want to code in Tradetron

Entry Time: 9.30

Parameters Required:

  1. Prev. Day High
  2. Prev. Day Low
  3. Current Day High at 9.30
  4. Current Day Low at 9.30

Calculations that I want to do are as follows:

Prev. Day Range = Prev. Day High - Prev. Day Low
Current Range = Current Day High at 9.30 - Current Day Low at 9.30

Final Range = (Prev. Day Range - Current Range)*some_constant_number

Call Strike = Prev. Day Close + Final Range
Put Strike = Prev. Day Close - Final Range

The output of call strike and put strike I want to sell using the algo

1 Like

call strike price

thanks for the answer…