Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 11:34:45 +0000



Post From: Cusotm symbol for CRUDE --- front month vs spreads

[2023-08-30 12:33:42]
DayTraderEsad - Posts: 121
Also here is the basic code in Python which is pulling just the closing price on a daily. I am just trying to recreate this to have a live intraday chart


clm24 = nasdaqdatalink.get("BCICE/WIM2024", authtoken="insert api key")
clz24 = nasdaqdatalink.get("BCICE/WIZ2024", authtoken="insert api key")
clz23 = nasdaqdatalink.get("BCICE/WIM2024", authtoken="insert api key")

clz3mz4 = clz23['Close'] - (clm24['Close'] - clz24['Close'])*4

plot.line(clz3mz4.index,clz23['Close'] - (clm24['Close'] - clz24['Close'])*4,line_color="black", legend_label = "CL Z23 vs M4Z4, 1 x 4", line_width=1.0)