Jump to content

[SHARING] RSI signals


osaze

Recommended Posts

Nice indicator .... just copy to ur metaeditor and compile .... voila

 

#property copyright "IndicatorForex.com"

#property link "www.IndicatorForex.com"

 

#property indicator_chart_window

#property indicator_buffers 3

#property indicator_color1 Green

#property indicator_color2 Red

#property indicator_color3 Red

 

extern double RSI.Period = 14.0;

extern int RSI.Overbought = 75;

extern int RSI.Oversold = 25;

extern bool Sound.Alert = TRUE;

double g_ibuf_96[];

double g_ibuf_100[];

 

int init() {

if (ObjectType("FXUltraLabel") != 23) ObjectDelete("FXUltraLabel");

if (ObjectFind("FXUltraLabel") == -1) ObjectCreate("FXUltraLabel", OBJ_LABEL, 0, Time[5], Close[5]);

ObjectSetText("FXUltraLabel", "Secret FOREX Indicator that won 127,912$ in 2009!");

ObjectSet("FXUltraLabel", OBJPROP_XDISTANCE, 20);

ObjectSet("FXUltraLabel", OBJPROP_YDISTANCE, 20);

if (ObjectType("FXUltraLabel2") != 23) ObjectDelete("FXUltraLabel2");

if (ObjectFind("FXUltraLabel2") == -1) ObjectCreate("FXUltraLabel2", OBJ_LABEL, 0, Time[5], Close[5]);

ObjectSetText("FXUltraLabel2", "Visit IndicatorForex.com For More Information");

ObjectSet("FXUltraLabel2", OBJPROP_XDISTANCE, 20);

ObjectSet("FXUltraLabel2", OBJPROP_YDISTANCE, 40);

SetIndexStyle(0, DRAW_ARROW);

SetIndexArrow(0, 221);

SetIndexBuffer(0, g_ibuf_96);

SetIndexEmptyValue(0, 0.0);

SetIndexStyle(1, DRAW_ARROW);

SetIndexArrow(1, 222);

SetIndexBuffer(1, g_ibuf_100);

SetIndexEmptyValue(1, 0.0);

return (0);

}

 

int deinit() {

ObjectDelete("FXUltraLabel");

ObjectDelete("FXUltraLabel2");

return (0);

}

 

int start() {

double lda_8[2];

if (ObjectType("FXUltraLabel") != 23) ObjectDelete("FXUltraLabel");

if (ObjectFind("FXUltraLabel") == -1) ObjectCreate("FXUltraLabel", OBJ_LABEL, 0, Time[5], Close[5]);

ObjectSetText("FXUltraLabel", "Secret FOREX Indicator that won 127,912$ in 2009!");

ObjectSet("FXUltraLabel", OBJPROP_XDISTANCE, 20);

ObjectSet("FXUltraLabel", OBJPROP_YDISTANCE, 20);

if (ObjectType("FXUltraLabel2") != 23) ObjectDelete("FXUltraLabel2");

if (ObjectFind("FXUltraLabel2") == -1) ObjectCreate("FXUltraLabel2", OBJ_LABEL, 0, Time[5], Close[5]);

ObjectSetText("FXUltraLabel2", "Visit IndicatorForex.com For More Information");

ObjectSet("FXUltraLabel2", OBJPROP_XDISTANCE, 20);

ObjectSet("FXUltraLabel2", OBJPROP_YDISTANCE, 40);

double l_iatr_0 = iATR(Symbol(), 0, 50, 1);

for (int l_index_12 = 0; l_index_12 < Bars; l_index_12++) {

g_ibuf_96[l_index_12] = 0.0;

g_ibuf_100[l_index_12] = 0.0;

for (int l_index_16 = 0; l_index_16 < 2; l_index_16++) lda_8[l_index_16] = iRSI(Symbol(), 0, RSI.Period, PRICE_CLOSE, l_index_12 + l_index_16);

if (lda_8[0] > RSI.Oversold && lda_8[1] < RSI.Oversold) g_ibuf_96[l_index_12] = Low[l_index_12] - l_iatr_0 / 2.0;

if (lda_8[0] < RSI.Overbought && lda_8[1] > RSI.Overbought) g_ibuf_100[l_index_12] = High[l_index_12] + l_iatr_0 / 2.0;

}

if (g_ibuf_96[2] == 0.0 && g_ibuf_96[1] != 0.0 && Open[0] == Low[0] && Open[0] == High[0] && Open[0] == Close[0]) Alert("RSI Signal: Long Trade");

if (g_ibuf_100[2] == 0.0 && g_ibuf_100[1] != 0.0 && Open[0] == Low[0] && Open[0] == High[0] && Open[0] == Close[0]) Alert("RSI Signal: Short Trade");

return (0);

}

One obvious truth.FOREX IS ANYTHING BUT EASY
Link to comment
Share on other sites

  • 4 months later...

Re: [sHARING] RSI signals

 

#property indicator_chart_window

#property indicator_buffers 6

#property indicator_color1 Blue

#property indicator_color2 Blue

#property indicator_color3 Red

#property indicator_color4 Red

#property indicator_color5 Black

#property indicator_color6 Black

 

extern string s.1 = "General Settings";

extern string s.2 = "========================";

extern string s.3 = "Alert via sound:";

extern bool Alert.Sound = TRUE;

extern string s.4 = "Alert via Email:";

extern bool Alert.Email = FALSE;

extern int period = 48;

double g_ibuf_120[];

double g_ibuf_124[];

double g_ibuf_128[];

double g_ibuf_132[];

double g_ibuf_136[];

double g_ibuf_140[];

int gi_144 = 0;

 

int init() {

if (ObjectType("FXUltraLabel") != 23) ObjectDelete("FXUltraLabel");

if (ObjectFind("FXUltraLabel") == -1) ObjectCreate("FXUltraLabel", OBJ_LABEL, 0, Time[5], Close[5]);

ObjectSetText("FXUltraLabel", "FXUltraTrend©, IndicatorForex.com");

ObjectSet("FXUltraLabel", OBJPROP_XDISTANCE, 20);

ObjectSet("FXUltraLabel", OBJPROP_YDISTANCE, 20);

SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 2);

SetIndexBuffer(0, g_ibuf_120);

SetIndexEmptyValue(0, 0.0);

SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 2);

SetIndexBuffer(1, g_ibuf_124);

SetIndexEmptyValue(1, 0.0);

SetIndexStyle(2, DRAW_HISTOGRAM, STYLE_SOLID, 2);

SetIndexBuffer(2, g_ibuf_128);

SetIndexEmptyValue(2, 0.0);

SetIndexStyle(3, DRAW_HISTOGRAM, STYLE_SOLID, 2);

SetIndexBuffer(3, g_ibuf_132);

SetIndexEmptyValue(3, 0.0);

SetIndexStyle(4, DRAW_NONE, STYLE_SOLID, 2, Blue);

SetIndexBuffer(4, g_ibuf_136);

SetIndexEmptyValue(4, 0.0);

SetIndexStyle(5, DRAW_NONE, STYLE_SOLID, 2, Red);

SetIndexBuffer(5, g_ibuf_140);

SetIndexEmptyValue(5, 0.0);

IndicatorShortName("FXUltraTrend");

return (0);

}

 

int deinit() {

ObjectDelete("FXUltraLabel");

return (0);

}

 

int start() {

double l_icci_0;

double l_icci_8;

double l_icci_16;

if (ObjectType("FXUltraLabel") != 23) ObjectDelete("FXUltraLabel");

if (ObjectFind("FXUltraLabel") == -1) ObjectCreate("FXUltraLabel", OBJ_LABEL, 0, Time[5], Close[5]);

ObjectSetText("FXUltraLabel", "FXUltraTrend©, IndicatorForex.com");

ObjectSet("FXUltraLabel", OBJPROP_XDISTANCE, 20);

ObjectSet("FXUltraLabel", OBJPROP_YDISTANCE, 20);

int li_24 = Bars - 11;

int li_28 = 0;

RefreshRates();

for (int li_32 = li_24; li_32 >= 0; li_32--) {

g_ibuf_120[li_32] = 0.0;

g_ibuf_124[li_32] = 0.0;

g_ibuf_128[li_32] = 0.0;

g_ibuf_132[li_32] = 0.0;

g_ibuf_136[li_32] = 0.0;

g_ibuf_140[li_32] = 0.0;

}

for (li_32 = li_24; li_32 >= 0; li_32--) {

li_28 = 0;

l_icci_0 = iCCI(NULL, 0, period, PRICE_TYPICAL, li_32);

l_icci_8 = iCCI(NULL, 0, period, PRICE_TYPICAL, li_32 + 1);

l_icci_16 = iCCI(NULL, 0, period, PRICE_TYPICAL, li_32 + 2);

if (li_32 == 0 && l_icci_8 >= gi_144 && l_icci_16 < gi_144) li_28 = 1;

if (li_32 == 0 && l_icci_8 <= gi_144 && l_icci_16 > gi_144) li_28 = -1;

if (l_icci_0 >= gi_144 && l_icci_8 < gi_144) {

g_ibuf_120[li_32] = Low[li_32];

g_ibuf_124[li_32] = High[li_32];

}

if (l_icci_0 <= gi_144 && l_icci_8 > gi_144) {

g_ibuf_128[li_32] = Low[li_32];

g_ibuf_132[li_32] = High[li_32];

}

if (l_icci_0 >= gi_144) {

g_ibuf_120[li_32] = Low[li_32];

g_ibuf_124[li_32] = High[li_32];

} else {

if (l_icci_0 <= gi_144) {

g_ibuf_128[li_32] = Low[li_32];

g_ibuf_132[li_32] = High[li_32];

}

}

if (li_28 == 1) {

if (Open[0] == Close[0] && Open[0] == Low[0] && Open[0] == High[0]) {

if (Alert.Sound) Alert("FXUltraTrend: Long signal on " + Symbol() + "!");

if (Alert.Email) SendMail("FXUltraTrend", "FXUltraTrend: Long signal on " + Symbol() + "!");

}

}

if (li_28 == -1) {

if (Open[0] == Close[0] && Open[0] == Low[0] && Open[0] == High[0]) {

if (Alert.Sound) Alert("FXUltraTrend: Short signal on " + Symbol() + "!");

if (Alert.Email) SendMail("FXUltraTrend: Short Signal", "FXUltraTrend: Short signal on " + Symbol() + "!");

}

}

}

return (0);

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...