Hey everyone, hope trading is going well, i will post the actual indicator language, this indicator is the "dharma dot" indicator, which plots a moving average as dots. It is currently set to place a dot on every hour, or 15mins, or 4hrs etc. I would like to know how it would be done, to have the same indicator on, for example, a 30 min chart, but instead of the dots on every 30 mins, be able to plot them say every three hours, or 4 hours etc..
any help will be appreciated!
Thank you, and Good Trading.
Censce
Dharma dot indicator :
// To be used with the ZoneJemputan(TM)
#property copyright "MA plotted as dots"
#property link "http://darmasdt.com/"
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 White
//---- input parameters
extern int panjang= 3;
//---- buffers
double titik[];
//---- variables
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+1);
//---- indicators
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,158);
SetIndexBuffer(0,titik);
SetIndexEmptyValue(0,0.0);
IndicatorShortName("Darma:: MA in DOT");
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
//int signal = MathRound(signal_day*1440/Period());
int counted_bars = IndicatorCounted();
//---- check for possible errors
if (counted_bars<0) return(-1);
//---- last counted bar will be recounted
if (counted_bars>0) counted_bars--;
limit = Bars - counted_bars;
for(int i=limit; i>=0; i--)
{
double bahan = iMA(NULL,0,panjang,0,MODE_SMA,PRICE_CLOSE,i);
titik[i]=bahan;
}
//----
return(0);
}
//+------------------------------------------------------------------+
any help will be appreciated!
Thank you, and Good Trading.
Censce
Dharma dot indicator :
// To be used with the ZoneJemputan(TM)
#property copyright "MA plotted as dots"
#property link "http://darmasdt.com/"
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 White
//---- input parameters
extern int panjang= 3;
//---- buffers
double titik[];
//---- variables
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+1);
//---- indicators
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,158);
SetIndexBuffer(0,titik);
SetIndexEmptyValue(0,0.0);
IndicatorShortName("Darma:: MA in DOT");
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
//int signal = MathRound(signal_day*1440/Period());
int counted_bars = IndicatorCounted();
//---- check for possible errors
if (counted_bars<0) return(-1);
//---- last counted bar will be recounted
if (counted_bars>0) counted_bars--;
limit = Bars - counted_bars;
for(int i=limit; i>=0; i--)
{
double bahan = iMA(NULL,0,panjang,0,MODE_SMA,PRICE_CLOSE,i);
titik[i]=bahan;
}
//----
return(0);
}
//+------------------------------------------------------------------+