// Price Zone Clouds Development		RR		181008
//custom studies source code must have the following two lines at the top of the file and in this order:
#include "sierrachart.h"
SCDLLName("RR customStudies1") // Change the text within the quote marks to your group (.DLL) of custom studies. 

//----------------------------------------------------------------------------*/

SCSFExport scsf_zz_PriceZoneSnip(SCStudyGraphRef sc)
{
	// Set the configuration variables
	SCSubgraphRef z0 = sc.Subgraph[0];
	SCSubgraphRef z1 = sc.Subgraph[1];
	SCSubgraphRef z2 = sc.Subgraph[2];
	SCSubgraphRef z3 = sc.Subgraph[3];
	SCSubgraphRef z4 = sc.Subgraph[4];
	SCSubgraphRef z5 = sc.Subgraph[5];
	
	if (sc.SetDefaults)
	{	
		sc.GraphName = "zz_PriceZoneClouds_snip";
		sc.StudyDescription = "semi-transparent price zone clouds.";
		//sc.s_UseTool::TransparencyLevel = 60;

		sc.AutoLoop = 1;
		sc.GraphRegion = 0;

		sc.FreeDLL = 1; // set to 1 during development so the DLL can be rebuilt w/o restarting Sierra Chart. 

		z0.Name = "z0";
		z0.DrawStyle = DRAWSTYLE_TRANSPARENT_FILL_BOTTOM;
		z0.PrimaryColor = RGB(255,0,0);
		z0.DrawZeros = false;

		z1.Name = "z1";
		z1.DrawStyle = DRAWSTYLE_TRANSPARENT_FILL_TOP;
		z1.PrimaryColor = RGB(255,0,0);
		z1.DrawZeros = false;
		
		z2.Name = "z2";
		z2.DrawStyle = DRAWSTYLE_TRANSPARENT_FILL_BOTTOM;
		z2.PrimaryColor = RGB(133,205,24);
		z2.DrawZeros = false;

		z3.Name = "z3";
		z3.DrawStyle = DRAWSTYLE_TRANSPARENT_FILL_TOP;
		z3.PrimaryColor = RGB(133,205,24);
		z3.DrawZeros = false;
		
		z4.Name = "z4";
		z4.DrawStyle = DRAWSTYLE_TRANSPARENT_FILL_BOTTOM;
		z4.PrimaryColor = RGB(255,0,0);
		z4.DrawZeros = false;

		z5.Name = "z5";
		z5.DrawStyle = DRAWSTYLE_TRANSPARENT_FILL_TOP;
		z5.PrimaryColor = RGB(255,0,0);
		z5.DrawZeros = false;

		return;
	}
	
	
// Data processing
	float x0=2865;
	float x1=2880;
	float x2=2890;
	
// Fill in the first subgraph output data array.  Modify this line to do what you want. 
	z0[sc.Index] = x0;
	z1[sc.Index] = x0+5;

	z2[sc.Index] = x1;
	z3[sc.Index] = x1+5;
	
	z4[sc.Index] = x2;
	z5[sc.Index] = x2+5;
}