Sierra Charts

Discussion in 'Trading Software' started by cmk, Jul 7, 2005.

  1. gulf690

    gulf690

    Sierra has to be one of the simplest and most robust programs I have come across.
    It works right out of the box and can be 'enhanced' to any degree you like with dll's and worksheets.
    Even computer challenged people should have no problems quickly setting up some very nice charts in Sierra and all at a very reasonable price.

    IMHO, fwiw etc

    gulf
     
    #21     Jul 17, 2005
  2. Banjo

    Banjo

    Thank you, I second this opinion, and all this for lunch money. Been using Seirra for 3 yrs now. Aside from it's capabilities, fast honest responses from their team, constant improvements/ upgrades, and people like kiwi who is certainly owed drinks and dinners to get him through the next 10 years if any of the recipients of his efforts have any class. It is a power tool, I know zip about coding but can make Sierra dance to my satisfaction with the workbook alone. I remember years ago when I first mentioned it on et and the thread degraded into denigrating the cheesey looking mountain logo and how it must have been created by a 12 yr. old. Sierra can help you park your ego at the bank.

    Disclaimer: I have no relationship with Sierra other than giving them money for their charting service.
     
    #22     Jul 17, 2005
  3. mokwit

    mokwit

    Also agree and by using IB feed you get real realtime data for a fraction of the cost of delayed realtime data from you know who.
     
    #23     Jul 17, 2005
  4. kiwi_trader - thank you for posting this.

    I realize this is a very old thread from 2005 but see you are still active.

    Do you happen to have current code for Sierra Chart for FVE and/or VFI by Katsanos?

    I've attempted compiling the code you show above but receive several errors. I'm assuming that some changes in Sierra Chart over the years are the reason.
     
    #24     May 15, 2019
  5. Here's an update to fix the incompatibilities. Its not pretty code, just a fixed version of the old one:

    Code:
    /*==========================================================================*/
    SCSFExport FVE(SCStudyInterfaceRef sc) {
    
        if (sc.SetDefaults)
        {
            sc.GraphName="Finite Volume Element";
            sc.Subgraph[0].Name="FVE";
            sc.Subgraph[1].Name=" ";
            sc.Subgraph[3].Name="0";
    
            sc.DrawZeros=1;
            sc.Input[2].Name="Type: 0=FVE, 1=LinRegresFVE";
            sc.Input[3].Name="Volatility Cut Off";
            sc.Input[4].Name="Samples";
            sc.Input[5].Name="LRS Length";
            sc.Input[6].Name="PriceSlope Multiplier";
    
        }
       
        if(sc.Input[2].GetInt()==0) {
            sc.GraphName="Finite Volume Element";
            sc.Subgraph[0].Name="FVE";
        } else {
            sc.GraphName="FVE Linear Regression Slope";
            sc.Subgraph[0].Name=" ";
            sc.Subgraph[1].Name="FVELRS"; 
            sc.Subgraph[2].Name="PriceLRS";
        };
    
        if(sc.ArraySize<100) return;
    
        int    i,pos;
        float  TP=0,TP1,MF,VolumePlusMinus=0,FVESum=0,VolAve=0,FVEFactor,FVE,
               Sum1=0,SumY=0,Sum2=0,SumBars,SumSqrBars, Num1, Num2, FVESlope, PriceSlope, Intercept;
    
    
        if(sc.Input[3].GetFloat()==0) sc.Input[3].SetFloat(0.0002);
        float CutOff=sc.Input[3].GetFloat();
        if(sc.Input[4].GetInt()==0) sc.Input[4].SetInt(21);
        int Samples=sc.Input[4].GetInt();
        if(sc.Input[5].GetInt()==0) sc.Input[5].SetInt(35);
        int Len=sc.Input[5].GetInt();
        if(sc.Input[6].GetInt()==0) sc.Input[6].SetInt(1);
        sc.DataStartIndex=Samples+5;
    
        SumBars= Len*(Len-1)*0.5;
        SumSqrBars=(Len-1)*Len*(2*Len-1)/6;
        Num2=(SumBars*SumBars)-(Len*SumSqrBars);
    
        for (pos=sc.DataStartIndex; pos < sc.ArraySize; pos++)
    
        {
            TP1=TP;
            TP = sc.BaseDataIn[7][pos];
            MF = ( sc.BaseDataIn[3][pos] - ((sc.BaseDataIn[1][pos] + sc.BaseDataIn[2][pos] )/2) )+ TP - TP1 ;
            if(MF > CutOff * sc.BaseDataIn[3][pos])
                FVEFactor = 1; else
                if(MF < (-1 * CutOff * sc.BaseDataIn[3][pos]))
                    FVEFactor = -1; else
                    FVEFactor = 0.000001;
    
                VolumePlusMinus = sc.BaseDataIn[4][pos] * FVEFactor ;
    
                FVESum = FVESum+VolumePlusMinus;
                VolAve = VolAve+sc.BaseDataIn[4][pos];
                FVE = ((FVESum/Samples)/(VolAve/Samples)) * 100 ; //
    
                if(sc.Input[2].GetInt()==0)
                {sc.Subgraph[0][pos] = FVE;} else
                {
                    sc.Subgraph[6][pos] = FVE;
                    if ( pos>=50)
                    {
                        Sum1=0; SumY=0;
                        for (i=0; i<=(Len-1); i++) {Sum1 = Sum1 + (i) * sc.Subgraph[6][pos-i];}
                        for (i=0; i<=(Len-1); i++) {SumY = SumY + sc.Subgraph[6][pos-i];}
                        Sum2=SumBars*SumY;
                        Num1=(Len*Sum1)-Sum2;
    
                        if(Num2!=0) FVESlope = Num1/Num2; else
                          FVESlope=0;
                    }
                    if ( pos>=50)
                    {
                        Sum1=0; SumY=0;
                        for (i=0; i<=(Len-1); i++) {Sum1 = Sum1 + (i) * sc.BaseDataIn[3][pos-i];}
                        for (i=0; i<=(Len-1); i++) {SumY = SumY + sc.BaseDataIn[3][pos-i];}
                        Sum2=SumBars*SumY;
                        Num1=(Len*Sum1)-Sum2;
    
                        if(Num2!=0) PriceSlope = Num1/Num2; else
                          PriceSlope=0;
                    }
    
                    sc.Subgraph[1][pos] = FVESlope;
                    sc.Subgraph[2][pos] = PriceSlope*sc.Input[6].GetInt();
                    sc.Subgraph[3][pos] = 0;
                };
    
    
                sc.Subgraph[4][pos] = VolumePlusMinus;
                sc.Subgraph[5][pos] = sc.BaseDataIn[4][pos];
                FVESum = FVESum-sc.Subgraph[4][pos-Samples+1];
                VolAve = VolAve-sc.Subgraph[5][pos-Samples+1];
    
    
        }
    };
    
    /***********************************************************************/
    SCSFExport VFI(SCStudyInterfaceRef sc) {
    
        if (sc.SetDefaults)
        {
            sc.GraphName="Volume Flow Indicator";
            sc.Subgraph[3].Name="VFI Smoothed";
    
            sc.Input[2].Name="Type: 0= One Colour, 1= Three Colour";
            sc.Input[3].Name="Period";
            sc.Input[4].Name="Coeff";
            sc.Input[5].Name="Max Volume Cutoff";
            sc.Input[6].Name="Smoothing Period";
    
        }
        if(sc.ArraySize<100) return;
    
        if(sc.Input[2].GetInt()==0)
        {
            sc.Subgraph[0].Name="VFI"; sc.Subgraph[1].Name=""; sc.Subgraph[2].Name="";
        } else
        {
            sc.Subgraph[0].Name="VFI Neutral";sc.Subgraph[1].Name="VFI Up"; sc.Subgraph[2].Name="VFI Dn";
        };
    
        int    i,pos;
        double  VFI=0, VFISmooth=0, VFISmooth1, MF, Inter, VInter, MyVolAvg=0, MyVolAvg1, VAve, CutOff, VMax,VC,DirectionalVolume,
                  sum=0, sma, sumstd, sumsqrs,sumd=0 ;
    
    
        if(sc.Input[3].GetInt()==0) sc.Input[3].SetInt(130);
        int Period=sc.Input[3].GetInt();
        if(sc.Input[4].GetFloat()==0) sc.Input[4].SetFloat(0.2);
        double Coef=sc.Input[4].GetFloat();
        if(sc.Input[5].GetFloat()==0) sc.Input[5].SetFloat(2.5);
        double VCoef=sc.Input[5].GetFloat();
        if(sc.Input[6].GetInt()==0) sc.Input[6].SetInt(3);
        double factor0 = 2/(sc.Input[6].GetInt()+1);
        sc.DataStartIndex=Period+5;
    
        for (pos=sc.DataStartIndex; pos < sc.ArraySize; pos++)
        {
            sc.Subgraph[3][pos]=0;
            MyVolAvg1=MyVolAvg;
            MyVolAvg = MyVolAvg+sc.BaseDataIn[4][pos];
    
            if(sc.BaseDataIn[7][pos]>0 & sc.BaseDataIn[7][pos-1]>0)
              {
                Inter = log10(sc.BaseDataIn[7][pos]) - log10(sc.BaseDataIn[7][pos-1]);
                sc.Subgraph[4][pos] = Inter;  // Calculate Std Deviation of Inter
                sum = sum + Inter;
                sma = sum/30 ;
                sum = sum - sc.Subgraph[4][pos-30+1];
                sumsqrs=0;
                    for(i=0; i<30; i++)
                        {
                            sumsqrs = sumsqrs + ((sc.Subgraph[4][pos-i]-sma)*(sc.Subgraph[4][pos-i]-sma));
                        }
                VInter= sqrtf(sumsqrs/30); // stddev
    
                CutOff = Coef * VInter * sc.BaseDataIn[3][pos] ;
                VAve = MyVolAvg1/Period ;
                VMax = VAve * VCoef ;
                if(sc.BaseDataIn[4][pos] < VMax) VC=sc.BaseDataIn[4][pos]; else VC=VMax;
                MF = sc.BaseDataIn[7][pos] - sc.BaseDataIn[7][pos-1];
                if(MF>CutOff) DirectionalVolume=VC; else if(MF<-CutOff) DirectionalVolume=-VC; else DirectionalVolume=0;
                sc.Subgraph[6][pos] = DirectionalVolume;
                sumd = sumd + DirectionalVolume;
                VFI = (sumd/Period) / VAve ;
                sumd = sumd - sc.Subgraph[6][pos-Period+1];
                if(pos>sc.DataStartIndex) VFISmooth = (1-factor0)*sc.Subgraph[3][pos-1] + factor0*VFI;
              }
            else
            { VFISmooth = 0; };
    
            if(sc.Input[2].GetInt()==0) sc.Subgraph[0][pos] = VFI; else
            {
                if(MF==CutOff) sc.Subgraph[0][pos] = VFI; else
                if(MF>CutOff) sc.Subgraph[1][pos] = VFI; else
                if(MF<CutOff) sc.Subgraph[2][pos] = VFI;
            };
            sc.Subgraph[3][pos] = VFISmooth;
    
            sc.Subgraph[5][pos] = sc.BaseDataIn[4][pos];
            MyVolAvg = MyVolAvg-sc.Subgraph[5][pos-Period+1];
        }
    };
       
    
     
    #25     May 18, 2019
  6. Thank you very much Kiwi_Trader!

    Just had to make one change for the studies to show

    It compiled with no errors but then error message (no study functions present) was displaying after the study dll name

    placing scsf_ in the first line of code before the study name FVE, like below solved it:


    SCSFExport scsf_FVE(SCStudyInterfaceRef sc)


    same for the VFI section:

    SCSFExport scsf_VFI(SCStudyInterfaceRef sc)
     
    #26     May 19, 2019