Jump to content

GOC ABHAFXS 2009


Recommended Posts

Re: GOC ABHAFXS 2009

 

thats some questions whitch im not understand...

 

1. if we are in a position should we move our TP every hour according new TP level?

2. when can we move our SL to 0-level?

 

regards

 

that is entirely up to you and you what u are comfortable with.

Link to comment
Share on other sites

  • 7 months later...

Re: GOC ABHAFXS 2009

 

here the GOC((ABHAFXS2009))H1 code.

 

[spoiler:gzp1as9z]#property copyright "Copyright ? 2008, Extra-FOREX"

#property link "[email protected] & [email protected]"

 

#property indicator_chart_window

#property indicator_buffers 7

#property indicator_color1 Blue

#property indicator_color2 Aqua

#property indicator_color3 Red

#property indicator_color4 Red

#property indicator_color5 Aqua

#property indicator_color6 LimeGreen

#property indicator_color7 LimeGreen

 

extern int Nmbr_Bars = 67;

extern int Order = 1;

extern double Ecart = 1.61323;

double g_ibuf_92[];

double g_ibuf_96[];

double g_ibuf_100[];

double g_ibuf_104[];

double g_ibuf_108[];

double g_ibuf_112[];

double g_ibuf_116[];

double gda_120[20][20];

double gda_124[20];

double gda_128[20];

double gda_132[20];

int gi_136;

int gi_140;

int gi_144;

int gi_148;

int gi_152;

int gi_156;

int gi_160;

double gd_164;

double gd_172;

double gd_180;

double gd_188;

double gd_196;

 

int init() {

Comment("");

SetIndexStyle(0, DRAW_LINE);

SetIndexBuffer(0, g_ibuf_92);

SetIndexBuffer(1, g_ibuf_96);

SetIndexBuffer(2, g_ibuf_100);

SetIndexBuffer(3, g_ibuf_104);

SetIndexBuffer(4, g_ibuf_108);

SetIndexBuffer(5, g_ibuf_112);

SetIndexBuffer(6, g_ibuf_116);

return (0);

}

 

int deinit() {

Comment("");

ObjectDelete("REG");

ObjectDelete("X1");

ObjectDelete("X2");

ObjectDelete("X3");

ObjectDelete("Z1");

ObjectDelete("Z2");

ObjectDelete("Z3");

return (0);

}

 

int start() {

if (Year() >= 2110) return (0);

datetime l_time_0 = 0;

SetIndexDrawBegin(0, Bars - Nmbr_Bars - 1);

SetIndexDrawBegin(1, Bars - Nmbr_Bars - 1);

SetIndexDrawBegin(2, Bars - Nmbr_Bars - 1);

SetIndexDrawBegin(3, Bars - Nmbr_Bars - 1);

SetIndexDrawBegin(4, Bars - Nmbr_Bars - 1);

SetIndexDrawBegin(5, Bars - Nmbr_Bars - 1);

SetIndexDrawBegin(6, Bars - Nmbr_Bars - 1);

if (l_time_0 != Time[0]) {

ObjectDelete("REG");

ObjectDelete("X1");

ObjectDelete("X2");

ObjectDelete("X3");

ObjectDelete("Z1");

ObjectDelete("Z2");

ObjectDelete("Z3");

l_time_0 = Time[0];

}

gi_152 = Order + 1;

gda_124[1] = Nmbr_Bars + 1;

for (gi_160 = 1; gi_160 <= gi_152 * 2 - 2; gi_160++) {

gd_164 = 0;

for (gi_156 = 0; gi_156 <= Nmbr_Bars; gi_156++) gd_164 += MathPow(gi_156, gi_160);

gda_124[gi_160 + 1] = gd_164;

}

for (gi_160 = 1; gi_160 <= gi_152; gi_160++) {

gd_164 = 0;

for (gi_156 = 0; gi_156 <= Nmbr_Bars; gi_156++) {

if (gi_160 == 1) gd_164 += (High[gi_156] + Low[gi_156]) / 2.0;

else gd_164 += (High[gi_156] + Low[gi_156]) / 2.0 * MathPow(gi_156, gi_160 - 1);

}

gda_128[gi_160] = gd_164;

}

for (gi_140 = 1; gi_140 <= gi_152; gi_140++) {

for (gi_136 = 1; gi_136 <= gi_152; gi_136++) {

gi_144 = gi_136 + gi_140 - 1;

gda_120[gi_136][gi_140] = gda_124[gi_144];

}

}

for (gi_144 = 1; gi_144 <= gi_152 - 1; gi_144++) {

gi_148 = 0;

gd_188 = 0;

for (gi_136 = gi_144; gi_136 <= gi_152; gi_136++) {

if (MathAbs(gda_120[gi_136][gi_144]) > gd_188) {

gd_188 = MathAbs(gda_120[gi_136][gi_144]);

gi_148 = gi_136;

}

}

if (gi_148 == 0) return (0);

if (gi_148 != gi_144) {

for (gi_140 = 1; gi_140 <= gi_152; gi_140++) {

gd_196 = gda_120[gi_144][gi_140];

gda_120[gi_144][gi_140] = gda_120[gi_148][gi_140];

gda_120[gi_148][gi_140] = gd_196;

}

gd_196 = gda_128[gi_144];

gda_128[gi_144] = gda_128[gi_148];

gda_128[gi_148] = gd_196;

}

for (gi_136 = gi_144 + 1; gi_136 <= gi_152; gi_136++) {

gd_180 = gda_120[gi_136][gi_144] / gda_120[gi_144][gi_144];

for (gi_140 = 1; gi_140 <= gi_152; gi_140++) {

if (gi_140 == gi_144) gda_120[gi_136][gi_140] = 0;

else gda_120[gi_136][gi_140] = gda_120[gi_136][gi_140] - gd_180 * gda_120[gi_144][gi_140];

}

gda_128[gi_136] = gda_128[gi_136] - gd_180 * gda_128[gi_144];

}

}

gda_132[gi_152] = gda_128[gi_152] / gda_120[gi_152][gi_152];

for (gi_136 = gi_152 - 1; gi_136 >= 1; gi_136--) {

gd_196 = 0;

for (gi_140 = 1; gi_140 <= gi_152 - gi_136; gi_140++) {

gd_196 += (gda_120[gi_136][gi_136 + gi_140]) * (gda_132[gi_136 + gi_140]);

gda_132[gi_136] = 1 / gda_120[gi_136][gi_136] * (gda_128[gi_136] - gd_196);

}

}

for (gi_156 = 0; gi_156 <= Nmbr_Bars; gi_156++) {

gd_164 = 0;

for (gi_144 = 1; gi_144 <= Order; gi_144++) gd_164 += (gda_132[gi_144 + 1]) * MathPow(gi_156, gi_144);

g_ibuf_92[gi_156] = gda_132[1] + gd_164;

}

gd_172 = iStdDev(NULL, 0, Nmbr_Bars, 0, MODE_SMA, PRICE_HIGH, 0) * Ecart;

for (gi_156 = 0; gi_156 <= Nmbr_Bars; gi_156++) {

g_ibuf_104[gi_156] = g_ibuf_92[gi_156] + gd_172;

g_ibuf_100[gi_156] = g_ibuf_92[gi_156] + (g_ibuf_104[gi_156] - g_ibuf_92[gi_156]) / 1.382;

g_ibuf_96[gi_156] = g_ibuf_92[gi_156] + (g_ibuf_100[gi_156] - g_ibuf_92[gi_156]) / 1.618;

g_ibuf_116[gi_156] = g_ibuf_92[gi_156] - gd_172;

g_ibuf_112[gi_156] = g_ibuf_92[gi_156] - (g_ibuf_92[gi_156] - g_ibuf_116[gi_156]) / 1.382;

g_ibuf_108[gi_156] = g_ibuf_92[gi_156] - (g_ibuf_92[gi_156] - g_ibuf_112[gi_156]) / 1.618;

}

ObjectCreate("REG", OBJ_ARROW, 0, Time[0], g_ibuf_92[0]);

ObjectSet("REG", OBJPROP_ARROWCODE, SYMBOL_RIGHTPRICE);

ObjectSet("REG", OBJPROP_COLOR, Gold);

ObjectCreate("X1", OBJ_ARROW, 0, Time[0], g_ibuf_96[0]);

ObjectSet("X1", OBJPROP_ARROWCODE, SYMBOL_RIGHTPRICE);

ObjectSet("X1", OBJPROP_COLOR, Aqua);

ObjectCreate("X2", OBJ_ARROW, 0, Time[0], g_ibuf_100[0]);

ObjectSet("X2", OBJPROP_ARROWCODE, SYMBOL_RIGHTPRICE);

ObjectSet("X2", OBJPROP_COLOR, Cornsilk);

ObjectCreate("X3", OBJ_ARROW, 0, Time[0], g_ibuf_104[0]);

ObjectSet("X3", OBJPROP_ARROWCODE, SYMBOL_RIGHTPRICE);

ObjectSet("X3", OBJPROP_COLOR, Cornsilk);

ObjectCreate("Z1", OBJ_ARROW, 0, Time[0], g_ibuf_108[0]);

ObjectSet("Z1", OBJPROP_ARROWCODE, SYMBOL_RIGHTPRICE);

ObjectSet("Z1", OBJPROP_COLOR, Aqua);

ObjectCreate("Z2", OBJ_ARROW, 0, Time[0], g_ibuf_112[0]);

ObjectSet("Z2", OBJPROP_ARROWCODE, SYMBOL_RIGHTPRICE);

ObjectSet("Z2", OBJPROP_COLOR, Cornsilk);

ObjectCreate("Z3", OBJ_ARROW, 0, Time[0], g_ibuf_116[0]);

ObjectSet("Z3", OBJPROP_ARROWCODE, SYMBOL_RIGHTPRICE);

ObjectSet("Z3", OBJPROP_COLOR, Cornsilk);

Comment("\n||||||||||||||||||||||||||||||||||||||||",

"\n||||||||||||||||||||||||||||||||||||||||",

"\n||SELL TARGET LEVEL ", g_ibuf_108[0],

"\n||SELL TARGET LEVEL ", g_ibuf_112[0],

"\n||||||||||||||||||||||||||||||||||||||||",

"\n||STOP LOSS 100 PIPS",

"\n||||||||||||||||||||||||||||||||||||||||",

"\n||NORMAL SELL LIMIT ", g_ibuf_104[0],

"\n||||||||||||||||||||||||||||||||||||||||",

"\n||S000%||L100%|| LEVEL||", g_ibuf_100[0],

"\n||S025%||L075%|| LEVEL||", g_ibuf_96[0],

"\n||S050%||L050%|| LEVEL||", g_ibuf_92[0],

"\n||S075%||L025%|| LEVEL||", g_ibuf_108[0],

"\n||S100%||L000%|| LEVEL||", g_ibuf_112[0],

"\n||||||||||||||||||||||||||||||||||||||||",

"\n||NORMAL BUY LIMIT ", g_ibuf_116[0],

"\n||||||||||||||||||||||||||||||||||||||||",

"\n||STOP LOSS 100 PIPS",

"\n||||||||||||||||||||||||||||||||||||||||",

"\n||BUY TARGET LEVEL ", g_ibuf_100[0],

"\n||BUY TARGET LEVEL ", g_ibuf_96[0],

"\n||||||||||||||||||||||||||||||||||||||||",

"\n||||||||||||||||||||||||||||||||||||||||", "");

return (0);

}[/spoiler:gzp1as9z]

 

enjoy....

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...