Support Board
Date/Time: Fri, 26 Apr 2024 05:33:50 +0000
Forward projection Bars doesn't project.
View Count: 1122
[2018-12-04 23:46:10] |
Blue Brazilian - Posts: 42 |
In studies6 and elsewhere on the Support Board, you have proposed the following code as an example of how to forward project beyond the last bar on the chart #include "sierrachart.h" #include <windows.h> #include <string> #include <stdlib.h> #include <algorithm> #include "scstudyfunctions.h" using namespace std; SCDLLName("ForwardProjectionBars2") SCSFExport scsf_ForwardProjectionBars2(SCStudyInterfaceRef sc) { SCSubgraphRef Open = sc.Subgraph[0]; SCSubgraphRef High = sc.Subgraph[1]; SCSubgraphRef Low = sc.Subgraph[2]; SCSubgraphRef Last = sc.Subgraph[3]; if (sc.SetDefaults) { // Set the configuration and defaults sc.FreeDLL = 1; sc.GraphName = "Forward Projection Bars2"; sc.AutoLoop = 1; sc.GraphRegion = 1; sc.GraphDrawType=GDT_OHLCBAR; Open.Name = "Open"; Open.DrawStyle = DRAWSTYLE_LINE; Open.PrimaryColor = RGB(0,255,0); Open.DrawZeros = false; Open.ExtendedArrayElementsToGraph= 100; High.Name = "High"; High.DrawStyle = DRAWSTYLE_LINE; High.PrimaryColor = RGB(0,255,0); High.DrawZeros = false; High.ExtendedArrayElementsToGraph= 100; Low.Name = "Low"; Low.DrawStyle = DRAWSTYLE_LINE; Low.PrimaryColor = RGB(0,255,0); Low.DrawZeros = false; Low.ExtendedArrayElementsToGraph= 100; Last.Name = "Last"; Last.DrawStyle = DRAWSTYLE_LINE; Last.PrimaryColor = RGB(0,255,0); Last.DrawZeros = false; Last.ExtendedArrayElementsToGraph= 100; return; } // Do data processing //Repeat last bar into forward projection area. if(sc.Index+1 >= sc.ArraySize) { for (int Index = sc.ArraySize ; Index < sc.ArraySize + Open.ExtendedArrayElementsToGraph ; Index++) { Open[Index] = sc.Open[sc.Index]; High[Index] = sc. High[sc.Index]; Low[Index] = sc. Low[sc.Index]; Last[Index] = sc. Close[sc.Index]; } } return; } http://www.sierrachart.com/image.php?Image=1543966669608.png |
[2018-12-05 07:24:12] |
Sierra Chart Engineering - Posts: 104368 |
There was a small problem involving candlestick bars in the extended area which was preventing them from being drawn. This is going to be resolved in the next release.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2018-12-05 07:24:35
|
To post a message in this thread, you need to log in with your Sierra Chart account: