Stop making exit call if there is no buy call


#1

Hello Team,

I have written the code to buy the stock on particular condition and same to get exit if the target is achieved. I want to know how to get exit and call stop loss hit if there is any buy call.
How system will come to know that there is buy call already has been placed so don’t make another buy call.


#2

this cannot be done without using for loop.

You will need to share code and screenshots of errors you are facing.