Support Board
Date/Time: Tue, 04 Nov 2025 10:15:54 +0000
Post From: Extra signals using ACSIL. Need help.
|   [2019-09-09 16:36:52]     |  
| User907968 - Posts: 847 | 
| 
                To solve problem 1, either  - set the 'Delta_Divergence_Up' & 'Delta_Divergence_Dn' both to zero each time the study is calculated or - add an else to your if....else if code that zeroes the 'Delta_Divergence_Up' & 'Delta_Divergence_Dn' when the trigger conditions are not met e.g.   if ((sc.Close[sc.Index] > sc.Open[sc.Index]) && (sc.BaseDataIn[Up][sc.Index] < sc.BaseDataIn[Down][sc.Index])) 
                { //if up volume is dominant then set value in up volume array to 1, this will cause the color_bar subgraph to draw Delta_Divergence_Up[sc.Index] = sc.Low[sc.Index] - (SignalOffset.GetInt() * sc.TickSize); //set down volume to 0, this is in case down volume triggered already during formation of bar //this is to offset signal other then "color bar", like arrow up/ down Delta_Divergence_Dn[sc.Index] = 0; } else if ((sc.Close[sc.Index] < sc.Open[sc.Index]) && (sc.BaseDataIn[Up][sc.Index] > sc.BaseDataIn[Down][sc.Index])) { // apply the same logic as above for down volume trigger Delta_Divergence_Dn[sc.Index] = sc.High[sc.Index] + (SignalOffset.GetInt() * sc.TickSize); //this is to offset signal other then "color bar", like arrow up/ down Delta_Divergence_Up[sc.Index] = 0; } else { Delta_Divergence_Dn[sc.Index] = 0; Delta_Divergence_Up[sc.Index] = 0; }  | 
        
