Share me a screenshot of record.
Losing Column heads is something i have came accross when converting arrays to a dataframe.
Anyways share a screenshot of the code and array once
Try 30 seconds and more. That should solve problem.
Rather I suggest use the drop function of Panda after good enough time- say a minute which will solve the issue
df = df[:-1]
@trader007 You will have to convert the historic data to pandas dataframe.
I am assuming you understand python and pandas and numpy library to do backtest
You can share your strategy.
I think what you need to do is understand pine script and take a note of formulae in strategies and work them out in your favorite client.
I did same. I fetched few chart types and trends and than converted it to python.…
@menaveenn
Hi,
Close=[k['close'] for k in his]
Open_1=[k['open'] for k in his]
Low=[k['low'] for k in his]
High=[k['high'] for k in his]
date1=[k['date'] for k in his]
Volume=[k['volume'] for k in his]
df=pd.DataFrame([Close,Open_1,Low,High,date1,…
import pandas as pd
def get_historical_data():
return kite.historical(instrument_token , from_dt , to_dt , interval)
No need to define function again.
You can do this directly
Data= kite.historical(instrument_token , from_dt , to_dt , interval)
Da…
As you said will get a new tick on LTP whenever there is a change in the price ,how frequent it is (approximately) ? In my case Im getting LTP for each symbol on average 12 times peer minute, is that ok ?
It is completely okay.
Which symbols are yo…
Hi,
how i can convert logic of
LOW>REF(LOW,1)
in python ?
Thanks
Ram
REF(LOW,1) is it previous low?
In pandas we have an option of
df['low']> df['low'].shift()
in pure python you can simply use (i-1) while looping
How many ticks you are getting from websocket for each symbol in a minute?
The three modes- Full, Quote , LTP. They all have different contents in it.
So for instance a full mode will have more ticks in a min coz every change, even a change in bid …
Okay. So for 2nd point,
You mean the OHLC tabular form that I will prepare, I let it be in memory rather in excel or anywhere else and run logic on it directly but than shouldn't I save it somewhere for next day and continue data from thereon?
If p…
@pg1337 Thanks mate
1. You mean I use Historical candles data till some point say previous days's 15:30 and for next day i run a function that fetches next 5 min candles as and when it happens into the same excel file or database and keep on adding…
instrument_token expiry lot_size name tradingsymbol
53373703 2016-12-19 1 CRUDEOIL DEC JAN 2017 CRDDECJA1716DECFUT
First I looked for Mini Crudeoil, than the above one.
Still I get same error
First you will have to convert the Tick data to DF in pandas.
You can do something like this-
import pandas as pd
Tick=pd.DataFrame(tick)
Also you can export this data to excel
Tick.to_excel('Tick.xlsx', sheet_name='Tick', index=False)
It is very easy.. You need 2 things.
1. Basic Understanding of Python to define a function and Looping
2. Python Pandas.
Let me know if you want any help in coding Heiken Ashi or further strategies.
[email protected]