is there a alert for the sdx ie when support or resistance hit
thank you
thank you
Trading with Heiken Ashi and Heiken Ashi smoothed - Hybrid 362 replies
Heiken Ashi and Heiken Ashi Smoothed EA needed for Renko 11 replies
Heiken ashi smoothed alert 9 replies
EA for Heiken Ashi + Heiken Ashi Smoothed 4 replies
Heiken Ashi Smoothed Journal 27 replies
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_HISTOGRAM, 0, 1, color1);
SetIndexBuffer(0, ExtMapBuffer1);
SetIndexStyle(1,DRAW_HISTOGRAM, 0, 1, color2);
SetIndexBuffer(1, ExtMapBuffer2);
SetIndexStyle(2,DRAW_HISTOGRAM, 0, 3, color3);
SetIndexBuffer(2, ExtMapBuffer3);
SetIndexStyle(3,DRAW_HISTOGRAM, 0, 3, color4);
SetIndexBuffer(3, ExtMapBuffer4);
//----
SetIndexDrawBegin(0,10);
SetIndexDrawBegin(1,10);
SetIndexDrawBegin(2,10);
SetIndexDrawBegin(3,10);
//---- indicator buffers mapping
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexBuffer(3,ExtMapBuffer4);
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
double haOpen, haHigh, haLow, haClose;
if(Bars<=10) return(0);
ExtCountedBars=IndicatorCounted();
//---- check for possible errors
if (ExtCountedBars<0) return(-1);
//---- last counted bar will be recounted
if (ExtCountedBars>0) ExtCountedBars--;
int pos=Bars-ExtCountedBars-1;
while(pos>=0)
{
haOpen=(ExtMapBuffer3[pos+1]+ExtMapBuffer4[pos+1])/2;
haClose=(Open[pos]+High[pos]+Low[pos]+Close[pos])/4;
haHigh=MathMax(High[pos], MathMax(haOpen, haClose));
haLow=MathMin(Low[pos], MathMin(haOpen, haClose));
if (haOpen<haClose)
{
ExtMapBuffer1[pos]=haLow;
ExtMapBuffer2[pos]=haHigh;
if (haOpen==haLow)GlobalVariableSet(Sy mbol()+"HA",1);
}
else
{
ExtMapBuffer1[pos]=haHigh;
ExtMapBuffer2[pos]=haLow;
if (haOpen==haHigh)GlobalVariableSet(S ymbol()+"HA",-1);
}
ExtMapBuffer3[pos]=haOpen;
ExtMapBuffer4[pos]=haClose;
pos--;
}
//----
return(0);
}
//+------------------------------------------------------------------+
DislikedHere you go Hang Cool. May I also recommend the SDX Pivots indicator. It is quite helpful and I use it everyday. It automatically plots support/resistance, pivots, daily open, yesterdays high and low, Fibonacci levels, etc. It takes a lot of hassle out of trading and can be deadly accurate with Heiken ashi smoothed, RSI, and 50, 100, and 200 MA's. Good Luck.Ignored
DislikedI would be really happy if you could help me with this
I want to use the Heiken Ashi indicator (code below) to
1) provide a signal when there is a shaven top or bottom ie the open and high are the same - signal sell (-1) or the open and low are the same - buy signal (1)
2) to provide this value on the last clossed bar not the current forming bar
Here is the code - thank you very much
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Red
#property indicator_color2 Green
#property indicator_color3...Ignored
#property indicator_chart_window #property indicator_buffers 4 #property indicator_color1 Red #property indicator_color2 Green #property indicator_color3 Green #property indicator_color4 White #property indicator_width1 1 #property indicator_width2 1 #property indicator_width3 3 #property indicator_width4 3 //---- extern color color1 = Red; extern color color2 = Green; extern color color3 = Red; extern color color4 = Green; //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; double ExtMapBuffer3[]; double ExtMapBuffer4[]; //---- int ExtCountedBars=0; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //|------------------------------------------------------------------| [indent]int init() { //---- indicators SetIndexStyle(0,DRAW_HISTOGRAM, 0, 1, color1); SetIndexBuffer(0, ExtMapBuffer1); SetIndexStyle(1,DRAW_HISTOGRAM, 0, 1, color2); SetIndexBuffer(1, ExtMapBuffer2); SetIndexStyle(2,DRAW_HISTOGRAM, 0, 3, color3); SetIndexBuffer(2, ExtMapBuffer3); SetIndexStyle(3,DRAW_HISTOGRAM, 0, 3, color4); SetIndexBuffer(3, ExtMapBuffer4); //---- SetIndexDrawBegin(0,10); SetIndexDrawBegin(1,10); SetIndexDrawBegin(2,10); SetIndexDrawBegin(3,10); //---- indicator buffers mapping SetIndexBuffer(0,ExtMapBuffer1); SetIndexBuffer(1,ExtMapBuffer2); SetIndexBuffer(2,ExtMapBuffer3); SetIndexBuffer(3,ExtMapBuffer4); //---- initialization done return(0); } [left][/left] [/indent]//+------------------------------------------------------------------+ [left]//| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+[/left] [indent]int start() [left]{ double haOpen, haHigh, haLow, haClose; if(Bars<=10) return(0); ExtCountedBars=IndicatorCounted(); //---- check for possible errors if (ExtCountedBars<0) return(-1); //---- last counted bar will be recounted if (ExtCountedBars>0) ExtCountedBars--; int pos=Bars-ExtCountedBars-1; while(pos>=0) { haOpen=(ExtMapBuffer3[pos+1]+ExtMapBuffer4[pos+1])/2; haClose=(Open[pos]+High[pos]+Low[pos]+Close[pos])/4; haHigh=MathMax(High[pos], MathMax(haOpen, haClose)); haLow=MathMin(Low[pos], MathMin(haOpen, haClose)); if (haOpen<haClose) { ExtMapBuffer1[pos]=haLow; ExtMapBuffer2[pos]=haHigh; if (haOpen==haLow)GlobalVariableSet(Sy mbol()+"HA",1); } else { ExtMapBuffer1[pos]=haHigh; ExtMapBuffer2[pos]=haLow; if (haOpen==haHigh)GlobalVariableSet(S ymbol()+"HA",-1); } ExtMapBuffer3[pos]=haOpen; ExtMapBuffer4[pos]=haClose; pos--; } [b]if(ExtMapBuffer1[1]==ExtMapBuffer3[1])//Last high = last open[/b] [b] Alert("Time to sell");[/b] [b]if(ExtMapBuffer2[1]==ExtMapBuffer4[1])//Last low = last close[/b] [b] Alert("Time to buy");[/b] //---- return(0); }[/left][/indent]
Dislikedi try Lonewolf (with trailing stop).mq4 to put in the Indikators folder
they dont work why?
smooth heiken Ashi works..
please help thxIgnored
QuoteDislikeddouble MA1 =iMA(NULL,PERIOD_H4,55,0,MODE_EMA,PRICE_OPEN,1);
Dislikedi have never utilized an EA before but trade manually using heiken ashi candles and stochs, filtered by 100 SMA on H4
this one looks promising, loading it up on a demo account as we speak, most likely test H1 or H4
if I were to change this piece of code:
and replace 55 with 100 and MODE_EMA with MODE_SMA, would this change the filter to be a 100 SMA on H4?
sorry I'm very new to mql4Ignored
DislikedHi,
I've got a different problem. I'm using the JFD Broker to test the LoneWolf EA on a demo account, however, no matter what I try, it won't place buys and sells.
My plan was actually to change the code in some places to accommodate for my ideas, but I can't get the unaltered version to work at all. I even replaced my Smooth HA indicator with the one from Otis' post. Just to have an easier time getting it to trade at all, I'm using the first version without filters and trailing.
I'm really at a loss here and any help would be appreciated....Ignored
DislikedI created this EA a while back and use it every so often during trending (non choppy) trading conditions. The EA opens a trade when color of candle changes and closes when the color of candle changes. It places trades one after another based on color changes. I also incorporated take profit, stop loss, breakeven and time management. The EA does well in higher time frames, especially in H4 during trending markets. I could never find an EA on the internet that used Heiken Ashi Smoothed in a simplistic manner. So here it is.Ignored
DislikedHello Traders, I'm new to this forum altogether and this is my first post :-) I went back to the lonewolf and made some alterations. I altered the open and close conditions to open at the first and second bar shift, and close at the first or second. I also gave it a stop loss. Back tested 2 years for the 1 Day timeframe and got (too good to be true?) results. Will you please check it and please tell me it's not too good to be true! :-S live testing starting today. {file}Ignored
DislikedHOW DO I BACK TEST? > I have got this EA on my LIVE and also a DEMO account and last 2 days NOT a single trade taken > I tried to run a strategy tester, and comes with ZERO results. AUTO trading is ON GREEN and I have a smily face! where am i going wrong? I am a bit of a newbie on Experts, can some please give me an idiots guide to thisIgnored