TradingView
daytraderph
6 de Jul. de 2020 7:17

Close Trade at end of day  

BRITANNIA INDSNSE

Descripción

script serves as an example how we can close trades at end of day.

can be session controlled or the time controlled.

the session should be adjusted to be earlier than the candle time.
Comentarios
Vaibhav_Kabdwal
After a lot of search, i finally got it from a fellow Indian trader. May you earn 10X this year.
sudhakarreddyk
When I tried this, its not working(not ending the the trade at the end of day), please guide if any changes required.
ms30141
@sudhakarreddyk, I am not sure, but try changing your chart time resolution to 4-1 hour or even minute interval. It is not going to work with a day interval or lower time resolutions.
FNOSURE
nice one sir
KumarMitesh
Great code. works perfectly! Thanks
puthenveetil
Thanks Brother for providing this :)
kankariyanitin
this code does't work in any time frame
daytraderph
@kankariyanitin, you need to understand and tweek the code according to you need. for more you can refer below link of pine.
tradingview.com/pine-script-docs/en/v4/essential/Sessions_and_time_functions.html
pranavkiruthik227
Thank you!
ms30141
Great work. Works for me. Also, if we use minute time interval, then on line 95 and 98 we would write if ( hour(time) == 15 and minute(time) >= 59 )
Más