Indicators Used
Miscellaneous
0
Views
0
Downloads
0
Favorites
MrsPacManSignal4
//+------------------------------------------------------------------+
//| MrsPacManSignal4.mq4 |
//| xxDavidxSxx |
//| xxDavidxSxx@yahoo.com |
//+------------------------------------------------------------------+
#property copyright "xxDavidxSxx"
#property link "xxDavidxSxx@yahoo.com"
#property indicator_separate_window
#property indicator_buffers 7
#property indicator_color1 Red
#property indicator_color2 MediumPurple
#property indicator_color3 Aqua
#property indicator_color4 MintCream
#property indicator_color5 Orange
#property indicator_color6 Blue
#property indicator_color7 Silver
extern int CCI_PeroidFast=55;
extern int MA_Volume=100;
extern int L_cciblock=250;
extern int S_cciblock=-250;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];
double ExtMapBuffer7[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_LINE);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_LINE);
SetIndexBuffer(3,ExtMapBuffer4);
SetIndexStyle(4,DRAW_LINE);
SetIndexBuffer(4,ExtMapBuffer5);
SetIndexStyle(5,DRAW_LINE);
SetIndexBuffer(5,ExtMapBuffer6);
SetIndexStyle(6,DRAW_LINE);
SetIndexBuffer(6,ExtMapBuffer7);
IndicatorShortName("MrsPacMan Signal");
//---- initialization done
double ma1prev=0,cci1=0,ma=0,ma1=0,ma2=0,ma3=0,jmav=0;
ma=iMA(NULL,0,6,0,MODE_LWMA,PRICE_WEIGHTED,1);
ma1=iMA(NULL,0,5,0,MODE_LWMA,PRICE_WEIGHTED,1);
ma1prev=iMA(NULL,0,5,0,MODE_LWMA,PRICE_WEIGHTED,2);
ma2=iMA(NULL,0,12,0,MODE_SMMA,PRICE_WEIGHTED,1);
ma3=iMA(NULL,0,21,0,MODE_EMA,PRICE_TYPICAL,1);
jmav=iCustom(Symbol(),Period(),"volumeMA",0,1);
cci1=iCCI( NULL, 0, CCI_PeroidFast, PRICE_TYPICAL, 1);
//Long
if (jmav > MA_Volume && ma1 > ma1prev && ma1 > ma && ma1 > ma2 && ma2 > ma3 && ma1 > ma3 && cci1< L_cciblock )
{
Alert ("MrsPacMan Buy Signal Generated",SYMBOL_ARROWUP);
}//Short
if (jmav > MA_Volume && ma1 < ma1prev && ma1 < ma && ma1 < ma2 && ma2 < ma3 && ma1 < ma3 && cci1 > S_cciblock )
{
Alert ("MrsPacMan Sell Signal Generated",SYMBOL_ARROWDOWN);
}
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
//----
//----
return(0);
}
//+------------------------------------------------------------------+
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---