@SRIJAN,
I run my algo on a Thinkpad r60, RAM=4gb, processor=intel core duo 2GHz, OS = Ubuntu 20.04.
All depends on your Wifi connection and use LAN instead of wifi for minimal latency delay (rarely useful).
If possible get a gaming laptop from a…
Try reading about After Market trades.
Yes, trades are done during this period. you might be getting data intermittently but not continuous during this period.
Hi @SAPANKHUNTIA,
You are calling the thread wrong, it doesn't spawn a new worker thread instead it runs on main.
Code:
new_thread = threading.Thread(target=helper_method_2, args= (ticks_data ), daemon= True)
Pass args seperately.
Hi @SAPANKHUNTIA
Threading structure:
t1 = threading.Thread(target = func_name, args=(arg1,arg2,....))
Use t1.start() only if ticks are present, so you wont start a thread with empty tick array, resulting in fatal error.
Code Example:
ticker = […
Hi @SAPANKHUNTIA ,
Your code looks ok, but instead of joining threads create a daemon thread.
You can't expect your helper thread to be ready every time a tick is received, so use queue to store ticks and pop ticks from queue to helper thread for …
@ks_unni
two more questions, if the 9:15:00 tick contains cumulative volume of pre-market minutes, how do we extract that particular ticks volume? what do we subtract?
Try to omit pre-market volume, set your volume at market open as your pivot and …
@ks_unni
Ok @RED, Thanks.. I read your answer again and I think I understood about the cumulative volume, so what about the very first tick get at 9:15:00 Does that contain the previous days last tick volume or is it just the volume of that second?…
@ks_unni
Code changes:
Check this link to arrange tick values-> https://kite.trade/forum/discussion/2604/convert-ticks-to-candle#latest
Never access database in main loop, seperate reading and updating database activities from the main code, …
Correct me if I am wrong,
Your case: You are resampling a 1-min OHLC data to 5-min interval.
Solution: Convert timestamp to minutes format, add all volumes in between two timeframes, where minutes is divisible by 5.
Example:
9:15 -> start coun…
@D11458.
There's a workaround to your problem. temporary fix.
Run your program with all the instruments available, and if your program signals a BUY/SELL to any instrument, execute it and you will get an error message -> "This script is not a…
@SAPANKHUNTIA ,
use kite.order_history(orderid), if individual fetch suffices.
If you use websockets and store all your trades, then use kite.orders() and collate with your local storage. if any mismatch, add them to your storage and update your po…
Query 2:
Say, if in my CO order(quantity = 100), 45 quantity gets executed and 55 is pending.
If trigger is executed/ cancelled, may I have a picture of what will the postback fields on quantities look like.(quantity, filled_quantity, pending quan…
Hi @sujith
Continuation to the above query :
If I cancel an executed CO order with status = "trigger pending" , I get two postback requests with status = "CANCELLED".
The only difference in the two requests is with the "pending_quantity" field,…
This is a bit roundabout @KamalChhirang, Sorry if this doesn't help.
Have a function that reads the status messages everytime a order has failed and use regex to automatically segregate the likes of CO/MIS being blocked. Add this to a list and avoi…
Use a timestamp as tag, it helps you maintain unique ids for orders.
Frequently check orderbook for open orders along the tag and proceed further. If a tag status is successful stop placing fresh order for that counter and if a tag is still active…
To get only ltp
a = kite.ltp(['NSE:NIFTY 50'])
To get the total details of the stock at that moment
a = kite.quote('NSE:NIFTY 50')
If you want to subscribe through websocket add the instrument tokens:
Nifty : 256265
Banknifty : 260105
Hi zuser, this happens when an algo does quote spoofing. As u deal with a much active stock in times of volatility there are big players spoofing the market depth and their latency is dealt in micro/nano seconds, where as being a retail individual l…
Hi @eldhoskariah ,
Most people use Moving averages to identify a momentum or trend alongside MACD or ADX.
Multiplier for moving averages depends on the time frame of your candle. If a wrong multiplier is used for different candle patterns, you ge…
Hi @prat, There is a 1% probability where RMS system doesn't update your order status(ie; postbacks aren't received). So if an order is placed and it isn't updated during postback checks, you ought to miss the trade status. There are many cases repo…
As mentioned by @RA7526, I check order history only when price comes near to my stoploss.
consider the following scenario:
> Placed CO order @100 SL @95
> From web socket data I check the price if it is coming near to SL(
Use orderhistory() function to get the status of your order time to time. Besides, keep monitoring the price with your local Buy/Sell.
No shortcuts to find this.
Other ways to use: .orders() or .trades() functions to cross-check trade execution.