Streak algo trading - 5EMA sell side candle breaek

Hello guys,

I am trying to implement one of the infamous strategy of 5EMA short intraday trade. The conditions are:

  1. 5 mins TF, period 9:15 to 10AM
  2. 5 EMA indicator
  3. Candle low should not touch the 5EMA.
  4. Enter as soon as the low of previous candle is broken.

Can someone please help me code it on Streak?
Example scrip: IRCTC on 7th Dec.

@Streak can you.

1 Like

How are you determining the 9:45 AM candle to be the reference candle? visually using charts or any other logic?

1 Like

Logic is:
Alert candle is the one which doesn’t touch 5EMA… enter in the next candle as soon as the low of alert candle breaks…
The alert candle keeps on shifting… in this case it shifted upto 9:45 since previous candles were away from 5EMA but the next candles weren’t breaking the alert candle’s (previous candle) low.
It happened at after 9:45 AM that the previous candle which was away from 5EMA and broke the low…
SL becomes alert candle high… and target double of sl…

I hope you got the logic…

Please help me in coding the algo?

@Streak @Krishnendu can you help please.

the 9:45 Candle low was broker by the 9:55 AM candle and not by the 9:50 AM candle.

If this is the condition, then you can write

Entry:
Low(0) lower than Low(-1) and Low(-1) higher than EMA 5

Exit:
High(0) higher than Signal candle( High,-1)

The exit condition will act as an SL. However, the target condition (2 x SL) can not be set in Streak currently.

1 Like

Thanks a lot for the logic guide…
after placing the entry and sl parameters and once the order is placed on the terminal, can i exit the trade manually?

Eg. when markets are sideways and Since targets are not placed in the logic code?

And one more thing… i want to enter short position as soon as the low is broken…
i tried backtesting the code… but it enters the trade at the next candle close.

Can you modify it please

Yes of course. You just need to select the strategy and click on the stop button. Please refer to the following image

If you have any specific criteria, based on which you can determine a sideways market, then can be added in the exit logic depending upon the criteria.

If you are referring to LTP, Streak sends triggers on the basis of OHLC data and not LTP. This cannot be added, unfortunately.

Refer: