Jump to content

NFX-Cyclone


Recommended Posts

  • 2 weeks later...

string gs_unused_76 = "--------------- Time Control ---------------";

int gi_84 = 1;

int gi_88 = 8;

int gi_92 = 8;

int gi_96 = 14;

extern string SL_TP = "--------------- SL- TP ---------------";

extern int Pips = 5;

extern int TakeProfit = 100;

extern int StopLoss = 10;

extern int Slippage = 3;

extern int TralStep = 10;

int gi_128 = 0;

extern string MM = "--------------- Money Management ---------------";

extern bool Use_MM = TRUE;

extern double Lots = 0.1;

extern int Risk = 20;

extern bool Martingale = FALSE;

extern int Multiplier = 2;

double gd_164;

string gs_unused_172 = "--------------- Day Filter ----------------";

extern bool Friday_Filter = TRUE;

int gi_184;

extern int MAGIC = 1129;

string gs_unused_192 = "NFX";

bool gi_200 = TRUE;

int gi_204 = 0;

bool gi_208 = FALSE;

bool gi_212 = FALSE;

int gi_unused_216;

int g_ticket_220 = 0;

double gd_224;

string gs_232 = "Nol Derajat";

string gs_240 = "NFXcyc2013";

extern string Key_Number = "";

datetime gt_256;

double gd_260;

 

int init() {

string lsa_0[256];

for (int index_4 = 0; index_4 < 256; index_4++) lsa_0[index_4] = CharToStr(index_4);

int str2int_8 = StrToInteger(lsa_0[67] + lsa_0[111] + lsa_0[112] + lsa_0[121] + lsa_0[32] + lsa_0[82] + lsa_0[105] + lsa_0[103] + lsa_0[104] + lsa_0[116] + lsa_0[32] +

lsa_0[169] + lsa_0[32] + lsa_0[75] + lsa_0[97] + lsa_0[122] + lsa_0[97] + lsa_0[111] + lsa_0[111] + lsa_0[32] + lsa_0[50] + lsa_0[48] + lsa_0[49] + lsa_0[49] + lsa_0[32]);

gi_unused_216 = 0;

return (0);

}

 

int start() {

string ls_0;

int order_total_12;

double ld_16;

double ld_24;

double price_32;

double price_40;

HideTestIndicators(TRUE);

gt_256 = D'30.06.2013 02:00';

/*if (TimeCurrent() > gt_256) {

Alert(" Maaf EA Sudah Expired....");

return (0);

}

if (Key_Number != gs_240) {

if (AccountName() != gs_232) {

Alert(" Nama Account harus Nol Derajat......");

return (0);

}

}*/

if (gi_200) {

ls_0 = "Copyright ©2013 NatheaFX";

Comment(ls_0);

}

int pos_8 = 0;

f0_3();

if (Friday_Filter) gi_184 = 5;

if (DayOfWeek() != gi_184) {

order_total_12 = f0_2();

if (order_total_12 < 0) return (0);

if (order_total_12 == 0) {

if (AccountFreeMargin() < 1500.0 * Lots) {

Print("Not enough money on deposit");

return (0);

}

gi_204 = FALSE;

gi_208 = FALSE;

gi_212 = FALSE;

}

ld_16 = 0.0;

ld_24 = 0.0;

price_32 = 0.0;

price_40 = 0.0;

if (gi_204 == FALSE && gi_208 == FALSE) {

if (TimeHour(TimeCurrent()) + gi_128 == gi_88 && gi_84 > -1) {

ld_16 = NormalizeDouble(High[iHighest(Symbol(), Period(), MODE_HIGH, gi_88 - gi_84 + 1, 0)], Digits);

ld_24 = NormalizeDouble(Low[iLowest(Symbol(), Period(), MODE_LOW, gi_88 - gi_84 + 1, 0)], Digits);

g_ticket_220 = OrderSend(Symbol(), OP_BUYSTOP, f0_0(), ld_16 + Pips * Point, Slippage, 0, 0, "", MAGIC, 0, Red);

if (OrderSelect(g_ticket_220, SELECT_BY_TICKET) == TRUE) {

if (StopLoss > 0) price_32 = OrderOpenPrice() - StopLoss * Point;

if (TakeProfit > 0) price_40 = OrderOpenPrice() + TakeProfit * Point;

OrderModify(OrderTicket(), OrderOpenPrice(), price_32, price_40, 0, Green);

g_ticket_220 = OrderSend(Symbol(), OP_SELLSTOP, f0_0(), ld_24 - Pips * Point, Slippage, 0, 0, "", MAGIC, 0, Red);

if (OrderSelect(g_ticket_220, SELECT_BY_TICKET) == TRUE) {

if (StopLoss > 0) price_32 = OrderOpenPrice() + StopLoss * Point;

if (TakeProfit > 0) price_40 = OrderOpenPrice() - TakeProfit * Point;

OrderModify(OrderTicket(), OrderOpenPrice(), price_32, price_40, 0, Green);

}

}

gi_208 = TRUE;

gi_204 = TRUE;

}

}

if (TimeHour(TimeCurrent()) + gi_128 == gi_96 && gi_92 > -1) {

if (gi_212 == FALSE) {

order_total_12 = OrdersTotal();

for (pos_8 = order_total_12 - 1; pos_8 >= 0; pos_8--) {

OrderSelect(pos_8, SELECT_BY_POS, MODE_TRADES);

if (OrderMagicNumber() == MAGIC)

if (OrderType() != OP_BUY && OrderType() != OP_SELL) OrderDelete(OrderTicket());

}

ld_16 = NormalizeDouble(High[iHighest(Symbol(), Period(), MODE_HIGH, gi_96 - gi_92 + 1, 0)], Digits);

ld_24 = NormalizeDouble(Low[iLowest(Symbol(), Period(), MODE_LOW, gi_96 - gi_92 + 1, 0)], Digits);

g_ticket_220 = OrderSend(Symbol(), OP_BUYSTOP, f0_0(), ld_16 + Pips * Point, Slippage, 0, 0, "", MAGIC, 0, Red);

if (OrderSelect(g_ticket_220, SELECT_BY_TICKET) == TRUE) {

if (StopLoss > 0) price_32 = OrderOpenPrice() - StopLoss * Point;

if (TakeProfit > 0) price_40 = OrderOpenPrice() + TakeProfit * Point;

OrderModify(OrderTicket(), OrderOpenPrice(), price_32, price_40, 0, Green);

g_ticket_220 = OrderSend(Symbol(), OP_SELLSTOP, f0_0(), ld_24 - Pips * Point, Slippage, 0, 0, "", MAGIC, 0, Red);

if (OrderSelect(g_ticket_220, SELECT_BY_TICKET) == TRUE) {

if (StopLoss > 0) price_32 = OrderOpenPrice() + StopLoss * Point;

if (TakeProfit > 0) price_40 = OrderOpenPrice() - TakeProfit * Point;

OrderModify(OrderTicket(), OrderOpenPrice(), price_32, price_40, 0, Green);

}

}

gi_212 = TRUE;

}

}

if (TralStep > 0 && StopLoss > 0) {

order_total_12 = OrdersTotal();

for (pos_8 = order_total_12 - 1; pos_8 >= 0; pos_8--) {

OrderSelect(pos_8, SELECT_BY_POS, MODE_TRADES);

if (OrderMagicNumber() == MAGIC) {

if (OrderType() == OP_BUY)

if (Bid - OrderStopLoss() > (StopLoss + TralStep) * Point) OrderModify(OrderTicket(), OrderOpenPrice(), Bid - StopLoss * Point, OrderTakeProfit(), 0, Green);

if (OrderType() == OP_SELL)

if (OrderStopLoss() - Ask > (StopLoss + TralStep) * Point) OrderModify(OrderTicket(), OrderOpenPrice(), Ask + StopLoss * Point, OrderTakeProfit(), 0, Green);

}

}

}

if (TimeHour(TimeCurrent()) != 0) return (0);

f0_1();

return (0);

}

return (0);

}

 

void f0_1() {

int order_total_0 = OrdersTotal();

for (int pos_4 = order_total_0 - 1; pos_4 >= 0; pos_4--) {

OrderSelect(pos_4, SELECT_BY_POS, MODE_TRADES);

if (OrderMagicNumber() == MAGIC) {

if (OrderType() == OP_BUY) {

OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, Blue);

continue;

}

if (OrderType() == OP_SELL) {

OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, Blue);

continue;

}

OrderDelete(OrderTicket());

}

}

gi_208 = FALSE;

gi_212 = FALSE;

}

 

int f0_2() {

int count_0 = 0;

int order_total_4 = OrdersTotal();

for (int pos_8 = 0; pos_8 < order_total_4; pos_8++) {

if (OrderSelect(pos_8, SELECT_BY_POS, MODE_TRADES) == FALSE) return (-1);

if (OrderMagicNumber() == MAGIC) count_0++;

}

return (count_0);

}

 

double f0_0() {

if (Martingale) {

if (OrderProfit() < 0.0) Risk *= Multiplier;

else {

if (OrderProfit() > 0.0) {

}

}

} else Risk = Risk;

if (Use_MM == FALSE) gd_164 = Lots;

if (Use_MM == TRUE) gd_164 = MathCeil(AccountFreeMargin() / 10000.0 * Risk) / 10.0;

if (gd_164 < MarketInfo(Symbol(), MODE_MINLOT)) gd_164 = MarketInfo(Symbol(), MODE_MINLOT);

if (gd_164 > MarketInfo(Symbol(), MODE_MAXLOT)) gd_164 = MarketInfo(Symbol(), MODE_MAXLOT);

return (NormalizeDouble(gd_164, 1));

}

 

void f0_3() {

gd_260 = MarketInfo(Symbol(), MODE_SPREAD);

gd_260 /= 10.0;

gd_224 = MathMax(MarketInfo(Symbol(), MODE_FREEZELEVEL), MarketInfo(Symbol(), MODE_STOPLEVEL));

f0_4(gd_260);

}

 

void f0_4(double ad_0) {

string text_8 = "Spread " + DoubleToStr(ad_0, 1) + " pips";

string text_16 = "NFX-Cyclon V1.0";

string text_24 = "Lot " + DoubleToStr(gd_164, 2);

string text_32 = "Balance " + DoubleToStr(AccountBalance(), 2);

string text_40 = "Commission " + DoubleToStr(OrderCommission(), 2);

double ld_48 = gd_224 / 10.0;

string text_56 = "Broker Stoplevel " + DoubleToStr(ld_48, 1) + " Pips";

if (ObjectFind("SpreadIndikatorObj") < 0) {

ObjectCreate("SpreadIndikatorObj", OBJ_LABEL, 0, 0, 0);

ObjectSet("SpreadIndikatorObj", OBJPROP_CORNER, 0);

ObjectSet("SpreadIndikatorObj", OBJPROP_YDISTANCE, 12);

ObjectSet("SpreadIndikatorObj", OBJPROP_XDISTANCE, 3);

ObjectSetText("SpreadIndikatorObj", text_8, 20, "Arial", Lime);

ObjectCreate("EA", OBJ_LABEL, 0, 0, 0);

ObjectSet("EA", OBJPROP_CORNER, 0);

ObjectSet("EA", OBJPROP_YDISTANCE, 48);

ObjectSet("EA", OBJPROP_XDISTANCE, 3);

ObjectSetText("EA", text_16, 15, "Arial Bold", Red);

ObjectCreate("EAlot", OBJ_LABEL, 0, 0, 0);

ObjectSet("EAlot", OBJPROP_CORNER, 0);

ObjectSet("EAlot", OBJPROP_YDISTANCE, 75);

ObjectSet("EAlot", OBJPROP_XDISTANCE, 3);

ObjectSetText("EAlot", text_16, 15, "Arial Bold", Red);

ObjectCreate("AccBalance", OBJ_LABEL, 0, 0, 0);

ObjectSet("AccBalance", OBJPROP_CORNER, 0);

ObjectSet("AccBalance", OBJPROP_YDISTANCE, 102);

ObjectSet("AccBalance", OBJPROP_XDISTANCE, 3);

ObjectSetText("AccBalance", text_32, 15, "Arial Bold", Red);

ObjectCreate("Commissi", OBJ_LABEL, 0, 0, 0);

ObjectSet("Commissi", OBJPROP_CORNER, 0);

ObjectSet("Commissi", OBJPROP_YDISTANCE, 152);

ObjectSet("Commissi", OBJPROP_XDISTANCE, 3);

ObjectSetText("Commissi", text_40, 12, "Arial Bold", Yellow);

ObjectCreate("Stop-level", OBJ_LABEL, 0, 0, 0);

ObjectSet("Stop-level", OBJPROP_CORNER, 0);

ObjectSet("Stop-level", OBJPROP_YDISTANCE, 170);

ObjectSet("Stop-level", OBJPROP_XDISTANCE, 3);

ObjectSetText("Stop-level", text_56, 12, "Arial Bold", Yellow);

}

ObjectSetText("SpreadIndikatorObj", text_8);

ObjectSetText("EA", text_16);

ObjectSetText("EAlot", text_24);

ObjectSetText("AccBalance", text_32);

ObjectSetText("Commissi", text_40);

ObjectSetText("Stop-level", text_56);

WindowRedraw();

}

Link to comment
Share on other sites

  • 2 weeks later...

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