Hey all,
I just made a quick python script (attached) that can be copy and pasted into Build Alpha's python environment. There is a video on YouTube and buildalpha.com/video that shows exactly how to use this script and import a strategy from Tradestation into Build Alpha.
Once imported you can run the analysis techniques and add to a portfolio, etc.
If your native language does not use "," then there might be some adjustments you have to make to the code.
As always, reach out to me via email if you have questions or difficulties.
Thanks and have a great weekend,
Dave
great stuff Dave. You may wish to send an email out to notify users - as they'll be frothing at the gills over this no doubt.
Yes, of course. will actually be sending it out tmrw or Tuesday along with updated BA.
Hey,
Try setting intraday to False and see if it runs. If not, please add these triple quotes as seen below to the code and run again.
df = pd.read_csv(input_file_name,delimiter=',',index_col=2,parse_dates=True,header=None)
if df.index[-1] == "Open":
df = df[:-1]
'''
if intraday:
df.index = [parse(d) for d in df.index]
df.index = [pd.to_datetime(d) for d in df.index]
else:
df.index = [pd.to_datetime(d) for d in df.index]
'''
df['Time'] = [str(d.hour * 10000 + d.minute * 100 + d.second) if intraday else "170000" for d in df.index]
df['Results'] = [float(x.replace('(','-').replace('$','').replace(')','').replace(',','')) for x in df[6]]
If neither of those work then please email me for further assistance.
Thanks,
David
Please make sure you have Using Custom Strategies selected in the settings menu and then have loaded the file from File->Custom Strategies menu. Finally, run the simulation using built-in NQ symbol.
Thanks,
David
I am doing exactly what you are advising but no success do you want me to send you final file?
Yes
User error as symbol needs to be all upper case to match the Build Alpha symbols. I have added logic to prevent user from entering lower case symbols in the future in this updated script.
To read in custom strategy while using custom data please use custom data symbol such as
symbol = #U1
Thanks,
David