Another major change to the current strategy.
Well, Although the primary context of creating the Udemy Mini-Course was to introduce people to the trading API world but the strategy is chosen here is a pure diaster. Anyways,
In our last message, we talked about calculating using Spot and using that value in futures. It is wrong. Especially when the future and spot in a difference of premium i.e Spot is trading at x and futures is trading at x+100 or x-100.
Last month it became significant. So, Let’s calculate the golden number from the spot and use that data into futures using futures’ closing price.
Original Strategy:
Scrip = BANKNIFTY Futures
- Golden Number = ((Previous Day High - Previous Day Low) + Opening Range of Today’s First 10 minutes))*61.8%
- Buy Above = (Previous Day Close + Golden Number)
- Sell Below = (Previous Day Close - Goldern Number)
Modified Strategy:
Scrip = BANKNIFTY
- Golden Number = ((Previous Day High - Previous Day Low) + Opening Range of Today’s First 10 minutes))*61.8%
- Buy Above = (Previous Day Close + Golden Number)
- Sell Below = (Previous Day Close - Goldern Number)
Now, Again Modified:
This part is from BANKNIFTY Futures.
Golden Number = ((Previous Day High - Previous Day Low) + Opening Range of Today’s First 10 minutes))*61.8%
This part is from BANKNIFTY Spot.
- Buy Above = (Previous Day Close + Golden Number)
- Sell Below = (Previous Day Close - Goldern Number)
The code in the last was -
lotsize = instrumentList[(instrumentList.tradingsymbol.str.match(tradesymbolfut))]
lotsize = str(lotsize.lot_size.iloc[0])
p_open,p_high,p_low,p_close=p_candle(get_insToken(var2.upper(),"NSE"),"day",-1)
c_open,c_high,c_low,c_close=get_ohlc(var2,exchange="NSE")
eqltp,futltp=both_ltp(var2)
golden_number=((p_high-p_low)+(c_high-c_low))*.618
golden_number=round_down(float(golden_number),0.05)
buy_above=round_down((p_close+golden_number),0.05)
sell_below=round_down((p_close-golden_number),0.05)
Now we will change that to -
tradesymbolfut = futname(var2)
lotsize = instrumentList[(instrumentList.tradingsymbol.str.match(tradesymbolfut))]
lotsize = str(lotsize.lot_size.iloc[0])
p_futopen,p_futhigh,p_futlow,p_futclose=p_candle(get_insToken(tradesymbolfut,"NFO"),"day",-1)
p_open,p_high,p_low,p_close=p_candle(get_insToken(var2.upper(),"NSE"),"day",-1)
c_open,c_high,c_low,c_close=get_ohlc(var2,exchange="NSE")
eqltp,futltp=both_ltp(var2)
golden_number=((p_high-p_low)+(c_high-c_low))*.618
golden_number=round_down(float(golden_number),0.05)
buy_above=round_down((p_futclose+golden_number),0.05)
sell_below=round_down((p_futclose-golden_number),0.05)