How to enter or exit at a specific price point (eg EMA) as soon has price hits the same without waiting for close of candle.

Dear Sir/Madam @Streak ,

I would like help on two codes - (Both are buys for swing trading)

Code 1 Supertrend
Entry : When Supertrend (10,1,0) Gives buy signal at hourly charts and the entry price at 2rs (say) lower than the close of the candle in which Supertrend Buy Signal was generated.(if such price occurs in the next candles).

Exit : Exit at specific self created support and resistance levels or specific price points

Code 2 - EMA based

Entry : Entry if EMA(50,0) crosses above price and difference between EMA and Candle close price is 5% (say) of EMA at that point. (Hourly Charts) (Please note EMA>Close price by 5% or more at that specific hourly candle.)

Exit : Conditional Exit - Exit at EMA Price
Please note that exit should happen when price reaches EMA - Not necessarily Close price of the Exit Candle. I want to exit as soon as Price hits EMA (50,0).

Thanks for your help in advance.

Hi @Vishal_B_S

You can implement the Entry condition but not the exit. The system cannot understand user-created Support or resistance. Here are the steps for implementing the Entry

a. Use this condition in the create page

b. Click on the strategy and click on Deploy. In the Predeplotment window, you need to set the Order Type as Limit and set the Default price as Close and Buffer as -2, ie. 2 rupees less than trigger candle Close
image

Again for number 2, you can use this for the Entry condition

Do you mean the current candle EMA 50 or the original Entry candle EMA 50?
You can create a condition for the Current candle EMA 50 after the completion of the candle i.e at candle close.
Currently original Entry candle EMA 50 cannot be implemented.

Dear Sir @Krishnendu

Thank you for the prompt response ;

For you last que - I meant Current Candle EMA 50( i.e the exit candle itself).

Is it not possible to ask Streak to exit as soon as price hits EMA 50 irrespective of candle close because sometimes the candle crosses EMA 50 during its 1 hour session but closes below EMA 50 due to which the trade doesn’t get executed at that candle.

Thank you

See the EMA 50 will get calculated using OHLC values. Now the OHLC of the trigger candle (exit) will only form after the completion of the candle so it will not do this check on a tick basis.

You can read