Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 17:17:55 +0000



Post From: How to compare EMA to price?

[2014-05-21 22:57:00]
User12676 - Posts: 70
Ok, well i deleted most of the code and have this left and it still doesnt draw the EMA on the chart....
Very wierd

// The top of every source code file must include this line
#include "sierrachart.h"


// This line is required. Change the text within the quote
// marks to what you want to name your group of custom studies.
SCDLLName("MIKE_WAVE_ALERT")



/*==========================================================================*/
SCSFExport scsf_ZigZagCumulativeVolumeStudy(SCStudyInterfaceRef sc)
{

  SCSubgraphRef ExponentialMA = sc.Subgraph[1];
  ExponentialMA.Name = "Exponential Moving Average";
  ExponentialMA.DrawStyle = DRAWSTYLE_LINE;
  ExponentialMA.PrimaryColor = RGB(255,0,255);


  
  if(sc.SetDefaults)
  {
    //During development set this flag to 1, so the DLL can be modified.
    //When development is completed, set it to 0 to improve performance.
    sc.FreeDLL = 1;  
  
    sc.GraphName="MIKE WAVE ALERT";
  
    //Manual looping
    sc.AutoLoop = 0;
    sc.GraphRegion = 0;


    return;
  }


sc.ExponentialMovAvg(sc.BaseDataIn[SC_LAST], ExponentialMA, 20);


}