mod note:
A quick reminder for everyone:
About this specific script
The issue here is not the author, not the idea — it’s the math.
Bots hallucinate. Its a thing. ChatGPT hallucinated that a regression slope behaves like any other plotted line. It assumed you could compare two points on the slope like this:
Obviously that is not true. The plot of the LRC comes from a complex set of arrays that results in a pretty line. But the math that created that line is not available to thinkscript. We have no access to the array math that creates the data points of an LRC plot.
It is not possible to use the slope of a linear regression line as part of our strategies ever.
I didn't review any other part of the bot's logic in this script. But the coloring of the array slope has been commented out in the original script:
A quick reminder for everyone:
» Bots get things wrong a lot — sometimes 40% or more.
» Moderators do not test or validate the AI‑generated scripts posted to the forum.
» This is not a reflection on @BillW, whose work is consistently excellent and well‑regarded in this community.
About this specific script
The issue here is not the author, not the idea — it’s the math.
Bots hallucinate. Its a thing. ChatGPT hallucinated that a regression slope behaves like any other plotted line. It assumed you could compare two points on the slope like this:
to determine whether a linear regression is “rising” or “falling.”slope > slope[1]
Obviously that is not true. The plot of the LRC comes from a complex set of arrays that results in a pretty line. But the math that created that line is not available to thinkscript. We have no access to the array math that creates the data points of an LRC plot.
It is not possible to use the slope of a linear regression line as part of our strategies ever.
I didn't review any other part of the bot's logic in this script. But the coloring of the array slope has been commented out in the original script:
# this does not work: Color logic: Spring Blue #4086FF = rising, Classic Rose #A70000 = falling
#RegSlope.AssignValueColor(if slope > slope[1] then CreateColor(64, 134, 255)
# else if slope < slope[1] then CreateColor(167, 0, 0) else Color.YELLOW);
Last edited: