MTF analysis and Dynamic Contrac

Dear @Streak and @Krishnendu Sir

I am trying to create the following Strategy on Multi Time Frame Basis with 1 min and 3 Min ;

Entry for Shorts when ;

IN 3 MIN Time Frame - Super Trend ( 10 , 1.5) is negative (i.e Close is below ST)
In 1 Min Time Frame - Close crosses below Super Trend (10,2)

Dynamic Contract as follows - CE Weekly Current Short at ATM + 1 Strike Price

Target - 60 Points in Nifty Index ( Around 20-30 INR in Options)

SL - Closing Above Super Trend (10,2) in 1 Min Time Frame when PL < 0
Trail at 9 EMA when PL > 0
Max SL - 20-30 Points in Nifty Index

Following SS is the coding done for the same



However, results are not satisfactory in terms of picking up the correct candle based on manual check - IT is either missing a candle or entering at random candle without condition being met.

Requesting some assistance to know if there is any error in my part for the same.

1 Like

Hi @Vishal_B_S,

Please share your strategy share link

Dear @Krishnendu Sir,

Please Find attach Link as requested

  1. *Options Back Test *
    Streak | World's first algo trading platform without coding

  2. Nifty Index Backtest
    Streak | World's first algo trading platform without coding

Highlighting few specific queries and observations for your ease;

  1. Strategy for short essentially should taken entry when 1 Min Super Trend is crossed downside AND 3 Min Super Trend is already negative and target is 60 Points with SL being Super Trend of 1 Min limited to 30 Points.

  2. I ran this strategy for Futures, Options and Nifty Index itself - While futures might give different results, surprisingly, there is a slight divergence in the way Nifty Index and Options are giving results. I was under the impression that as entry in options is based on Index - the number of entries and the timings has to match exactly.

  3. Observations of certain entries

as per options back test as on Feb 28 2022 following entries have been picked for short - but these entries are not supposed to be picked ( refer to zerodha chart provided)

11:38 Entry : TradingView Chart

14:02 Entry : TradingView Chart

  1. Similar in the Nifty Index Backtest Following entry on 28 Feb 2022 do not seems appropriately signaled;

12:13 Entry : TradingView Chart

  1. I would like to if there is any way we can take entry in futures based on Index chart using streak ?

  2. Other Few entries of notice are as follows

Nifty Backtest - Incorrect Entries - 2 Feb 14:09* | 3 Feb 9:35 | 7 Feb 9:39 | 8 Feb 9:24* |14 Feb 12:31 | 15 Feb 13:10* |22 Feb 13:25* | 23 Feb 13:30* | (* are those entries where 3 min and 1 Min St have changed or are very close AT SAME TIME - which the function Multi time frame completed is required to filter out.

Nifty Options Backtest - Entry Timings broadly doesn’t not match to Nifty Index test also.

It is a fairly straightforward strategy - I would like to know where I am going wrong .

Thank you for your assistance.


Hi @Vishal_B_S,

Even though you had created a Long strategy where the Entry position is Buy, the strategy Entry conditions are of a Short for Strategy link 1.

For Long Close(0) should crosses above Supertrend(10,2,0) and Close(0) should be higher than Multitime frame completed(3min, Supertrend(10,1.5,0) )

In the same strategy you are also shorting call which is a Short trade but you are taking a long position in Nifty Future.

Also, the number of entries for a Future and an option can differ because of the fundamental nature of the instruments as well as volatility. If the option moves faster and exits before the Future because of TP getting triggered, it will again start searching for a new entry while the Future still has an open position.

You need to use the ChartIQ chart when matching Streak backtest results. The supertrend indicator will give a slightly different entry signal as compared to the Tradingview chart since different chart libraries have slightly different formulas.

Yes, you can.

  1. You need to add the Future in + instrument section

  1. Select the position type, quantity and candle interval

  2. Use the SYMBOL function to create the condition on the index. Here in the image I have selection Nifty 50 index

  3. Complete this by adding your exit condition.

And thats it!