Login Page - Create Account

Support Board


Date/Time: Tue, 26 Aug 2025 08:57:08 +0000



[Programming Help] - Custom Study not plotting correctly

View Count: 154

[2025-07-21 20:20:39]
Knapp-Time - Posts: 3
I have a relatively simple ACSIL custom study to calculate the difference of the 200 SMA of the current bar to the value 7 bars previous. I added logging and see that the Delta subgraph is printing values around 3.78 in the log but the plot doesn't look correct - it is trending down when the 200 SMA is trending up. I am attaching the ACSIL code as compiled, screen shot of chart, and message log. Appreciate any help with this. The code seems (to me) to fairly simple. Also, I tried same study on a time based chart instead of the tick chart but got the same result.

Screenshot of chart
https://www.sierrachart.com/image.php?Image=1753128933940.png

Debug Logs
2025-07-21 15:51:34.446 | Chart: NQU25_FUT_CME [CBV][M] 5 Min #3 | Study: Slow MA Delta Trend Strength - Manual Loop | SlowMA: 23321.164062, SlowMA: 23317.419922, Delta: 3.744141 | Number times message added: 1
2025-07-21 15:51:34.681 | Chart: NQU25_FUT_CME [CBV][M] 5 Min #3 | Study: Slow MA Delta Trend Strength - Manual Loop | SlowMA: 23321.160156, SlowMA: 23317.419922, Delta: 3.740234 | Number times message added: 4
2025-07-21 15:51:35.348 | Chart: NQU25_FUT_CME [CBV][M] 5 Min #3 | Study: Slow MA Delta Trend Strength - Manual Loop | SlowMA: 23321.154297, SlowMA: 23317.419922, Delta: 3.734375
2025-07-21 15:51:35.491 | Chart: NQU25_FUT_CME [CBV][M] 5 Min #3 | Study: Slow MA Delta Trend Strength - Manual Loop | SlowMA: 23321.160156, SlowMA: 23317.419922, Delta: 3.740234 | Number times message added: 1

attachmentMoving_Avg_Delta_Debug.cpp - Attached On 2025-07-21 20:18:59 UTC - Size: 1.61 KB - 43 views
[2025-07-22 05:55:22]
cmet - Posts: 719
You're plotting difference on a very small scale. How were you expecting the plot to look?
[2025-07-22 14:20:20]
Knapp-Time - Posts: 3
The scale is very small at this point because the 200 SMA is flat. When the MA is trending, the values will be larger. I want to develop trading entry and exit rules based somewhat on the steepness of the 200 SMA. On one bullish day I have been looking at the SMA was above 10 and steepening. Rather than look in the tool values window and subtracting manually, the delta plot will let me hover the cursor over it and instantly see the numerical value that represents steepness.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account