I am placing BUY limit order in the above manner at a price greater than ltp but it buys at ltp only.
So if I want to buy at some price higher than ltp how should I modify the above code.
Also instead can I place a single type GTT buy order?
One thing that I found was -
target = target * round(target/tick_size)
target = tick_size* round(target/tick_size)
So in case of REL already ltp was high and target got unreasonably higher due to this mistake.
So this might be the iss…
@sujith @rakeshr thanks a lot for helping.
I have one more query.
Now I also have one more sell exit condition apart from stop loss and target. So it may be possible that this condition is satisfied but GTT orders are still pending.
How to take …
Also, what is the correct way of finding sl_price, target?
ltp = 2067.7
I want 1% stop loss
So my sl_price should be ltp - 0.01*ltp = 0.99 * ltp right?
And how should I take modulo tick_size to make it a multiple of tick_size, 0.05…