Login Page - Create Account

Support Board


Date/Time: Mon, 06 May 2024 03:39:10 +0000



Post From: Intraday data editor bad prices

[2022-10-14 03:12:57]
User660727 - Posts: 50
It appears that SYMBOL_DATA_DISPLAY_PRICE_MULTIPLIER is not correct until after history bars have been processed. That is, until sc.Index is current.
This would be OK, if there were a way to detect when SYMBOL_DATA_DISPLAY_PRICE_MULTIPLIER is valid?

The following study demonstrates the issue (see attached image)

To duplicate:
* Attach study from below
* Reload and recalculate chart
* You should see a value of 1.00 until the last bar where it gets the correct value of 0.10

#include <sierrachart.h>

SCDLLName("SCTest");
SCSFExport scsf_SCTest(SCStudyGraphRef sc) {
if (sc.SetDefaults) {
sc.AutoLoop = 1;
sc.Subgraph[0].Name = "Multiplier";
return;
}
sc.Subgraph[0].Data[sc.Index] = (float)sc.GetSymbolDataValue(SYMBOL_DATA_DISPLAY_PRICE_MULTIPLIER);
}

Date Time Of Last Edit: 2022-10-20 04:14:45
imagemulti.png / V - Attached On 2022-10-14 03:12:48 UTC - Size: 45.27 KB - 69 views