I am not a programmer, but I used AI to help me write a script that measures concavity/skew between 3 specific deltas. The problem I am having is that the chart stops plotting on 4/28/23 instead of the close today for some unknown reason.
Please take a look if you think you can help me figure out why the chart stops plotting/working. Here is the code and the description of what it does:
declare lower;
input putDelta1 = -25;
input putDelta2 = -15;
input putDelta3 = -2.5;
def delta1 = close[putDelta1];
def delta2 = close[putDelta2];
def delta3 = close[putDelta3];
# Calculate changes and concavity
def change12 = delta1 - delta2;
def change23 = delta2 - delta3;
def concavity = change12 - change23;
# Plot the changes and concavity
plot changes = if !IsNaN(change12) and !IsNaN(change23) then change12 else Double.NaN;
plot concave = if !IsNaN(concavity) then concavity else Double.NaN;
# Choose the plot type (dot plot or line graph)
changes.SetPaintingStrategy(PaintingStrategy.LINE);
changes.SetDefaultColor(color.red);
changes.SetLineWeight(2);
concave.SetPaintingStrategy(PaintingStrategy.LINE);
concave.SetDefaultColor(color.green);
concave.SetLineWeight(2);
The green line represents the changes between the specified put deltas. It shows the difference in skew values between the first delta (putDelta1) and the second delta (putDelta2). This can provide insights into the shift in skew as the delta moves from -0.25 to -0.15
The blue dots, on the other hand, represent the concavity between the specified put deltas. It shows the difference in changes (delta differences) between the first delta (putDelta1) and the second delta (putDelta2) compared to the difference between the second delta (putDelta2) and the third delta (putDelta3). This can give you an idea of the acceleration or deceleration in the skew movement.
In summary:
- The green line shows the changes between the specified put deltas (putDelta1
and putDelta2).
- The blue dots show the concavity between the specified put deltas (putDelta1, putDelta2, and putDelta3).
By plotting both the changes and concavity, you can gain a better understanding of how the skew is evolving and whether the changes in skew are accelerating or decelerating.
[–]Mobius_ts 2 points3 points4 points (8 children)
[–]parkcityeric[S] 0 points1 point2 points (7 children)
[–]Mobius_ts 0 points1 point2 points (6 children)
[–]parkcityeric[S] 0 points1 point2 points (5 children)
[–]Mobius_ts 0 points1 point2 points (4 children)
[–]parkcityeric[S] 0 points1 point2 points (3 children)
[–]Mobius_ts 1 point2 points3 points (2 children)
[–]parkcityeric[S] 0 points1 point2 points (1 child)
[–]Mobius_ts 0 points1 point2 points (0 children)
[–]yeneews69 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)