Daily Time Trigger

I have a simple syntax question -

I want to check if the difference of two futures prices is below a certain number everyday after 3:25 PM. Does the code below help me to achieve this trigger setup?

LastTradedPrice(‘NFO:BANKNIFTY20AUGFUT’) - LastTradedPrice(‘NFO:BANKNIFTY20JULFUT’) < (0) && Timestamp() > Hour()==15 && Minute()==25

If not, please advise the changes to be made in order to achieve the trigger setup.

You can use the below given code.

LastTradedPrice(‘NFO:BANKNIFTY20AUGFUT’) - LastTradedPrice(‘NFO:BANKNIFTY20JULFUT’) <= 100 && Hour()==15 && Minute()<=25

Note: once sentinel alert is triggered it will become in active, it will not trigger again on next day unless you activate it manually.

1 Like

Thank you for replying! Appreciate the prompt response.

Yes, will reactivate every time if the alert gets triggered.

But in your code for the minute () <= 25. This means that it will be after 3:00 PM before 3:25 PM right? If I want the code for checking the condition after 3:25 PM , it should be Minute() >= 25?

LastTradedPrice(‘NFO:BANKNIFTY20AUGFUT’) - LastTradedPrice(‘NFO:BANKNIFTY20JULFUT’) <= 100 && Hour()==15 && Minute()>=25

The above will be the right code for checking between 3:25 PM and 3:30 PM correct?

You are correct.

1 Like

Thank you for answering all my queries! :grinning:

Appreciate it!