BUY FXO Forum Shares
1316
Shares in the BANK:
We BuyWe Sell
$1.8426$1.8996
Results 1 to 7 of 7

Thread: Kongsi Source Code EA Anda Disini

  1. #1
    Piplet Akulascalper's Avatar
    Join Date
    Dec 2008
    Posts
    12
    FXO Shares
    0
    FXO Bonus
    0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Kongsi Source Code EA Anda Disini

    Sila kongsi Coding EA anda dalam thread ni.

    Sapa2 yang ada baik punyer source code EA tu...sudi2 la upload kat sini.

    Tujuannya supaya kita sama2 boleh belajar coding EA.

    Ok..TQ

  2. #2
    Elder Analyst kutu_loncat's Avatar
    Join Date
    Jul 2008
    Location
    Dili, Timor Leste
    Posts
    659
    FXO Shares
    0
    FXO Bonus
    0.000
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by Akulascalper View Post
    Sila kongsi Coding EA anda dalam thread ni.

    Sapa2 yang ada baik punyer source code EA tu...sudi2 la upload kat sini.

    Tujuannya supaya kita sama2 boleh belajar coding EA.

    Ok..TQ
    huhuhu.. tuan tanah takmo start dulu ke?

    setakat ni pakai ea apa? sistem dia camner fungsi?

  3. #3
    Piplet Akulascalper's Avatar
    Join Date
    Dec 2008
    Posts
    12
    FXO Shares
    0
    FXO Bonus
    0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Source Code -- FAB4X EA...Page 1

    #property copyright " Copyright 2008 - FAB4X"
    #property link " Copyright 2008 - FAB4X INTL"
    #include <stdlib.mqh>
    //+------------------------------------------------------------------+
    //| Common External variables |
    //+------------------------------------------------------------------+
    extern double Lots = 0.1;
    extern double StopLoss = 0;
    extern double TakeProfit = 10.00;
    extern double TrailingStop = 5.00;

    //+------------------------------------------------------------------+
    //| External variables |
    //+------------------------------------------------------------------+
    extern double MaxTrades = 2;
    extern double Pips = 5;
    extern double SecureProfit = 10;
    extern double AccountProtection = 1;
    extern double OrderstoProtect = 3;
    extern double ReverseCondition = 0;
    extern double EURUSDPipValue = 10;
    extern double GBPUSDPipValue = 10;
    extern double USDCHFPipValue = 7.94;
    extern double USDJPYPipValue = 9.03;
    extern double mm = 0;
    extern double risk = 12;
    extern double AccountisNormal = 0;
    extern double TimeZoneofData = 0;

    //+------------------------------------------------------------------+
    //| Global variables |
    //+------------------------------------------------------------------+
    double OpenOrders = 0;
    int cnt = 0;
    double slippage = 5;
    double sl = 0;
    double tp = 0;
    double BuyPrice = 0;
    double SellPrice = 0;
    double lotsi = 0;
    double mylotsi = 0;
    double mode = 0;
    double MyOrderType=0;
    bool ContinueOpening = True;
    double LastPrice = 0;
    double PreviousOpenOrders = 0;
    double Profit = 0;
    double LastTicket = 0;
    double LastType = 0;
    double LastClosePrice = 0;
    double LastLots = 0;
    double Pivot = 0;
    double PipValue = 0;
    bool Reversed = False;
    string text = "";
    string text2 = "";
    double myl = 0;
    double myh = 0;
    double myC = 0;
    double myO = 0;
    double mypivot = 0;
    double Today = 0;
    double RefDate = 0;
    double LastBarOfDay = 0;
    double FirstBarOfDay = 0;
    double Loop = 0;
    double myyh = 0;
    double myyl = 0;
    double myyc = 0;
    double p = 0;
    double flp = 0;
    double feh = 0;
    double fel = 0;
    double ph = 0;
    double pl = 0;
    double gap = 0;

  4. #4
    Piplet Akulascalper's Avatar
    Join Date
    Dec 2008
    Posts
    12
    FXO Shares
    0
    FXO Bonus
    0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Source Code -- FAB4X EA...Page 2

    bool SetObjectText(string name, string text, string font, int size, color Acolor)
    {
    return(ObjectSetText(name, text, size, font, Acolor));
    }

    bool MoveObject(string name, int type, datetime Atime, double Aprice, datetime Atime2 = 0, double Aprice2 = 0, color Acolor = CLR_NONE, int Aweight = 0, int Astyle = 0)
    {
    if (ObjectFind(name) != -1) {
    int OType = ObjectType(name);

    if ((OType == OBJ_VLINE) ||
    (OType == OBJ_HLINE) ||
    (OType == OBJ_TRENDBYANGLE) ||
    (OType == OBJ_TEXT) ||
    (OType == OBJ_ARROW) ||
    (OType == OBJ_LABEL)) {
    return(ObjectMove(name, 0, Atime, Aprice));
    }

    if ((OType == OBJ_GANNLINE) ||
    (OType == OBJ_GANNFAN) ||
    (OType == OBJ_GANNGRID) ||
    (OType == OBJ_FIBO) ||
    (OType == OBJ_FIBOTIMES) ||
    (OType == OBJ_FIBOFAN) ||
    (OType == OBJ_FIBOARC) ||
    (OType == OBJ_RECTANGLE) ||
    (OType == OBJ_ELLIPSE) ||
    (OType == OBJ_CYCLES) ||
    (OType == OBJ_TREND) ||
    (OType == OBJ_STDDEVCHANNEL) ||
    (OType == OBJ_REGRESSION)) {
    return(ObjectMove(name, 0, Atime, Aprice) && ObjectMove(name, 1, Atime2, Aprice2));
    }
    }
    else {
    return(ObjectCreate(name, type, 0, Atime, Aprice, Atime2, Aprice2, 0, 0) && ObjectSet(name, OBJPROP_COLOR, Acolor));
    }
    }

    //+------------------------------------------------------------------+
    //| Initialization |
    //+------------------------------------------------------------------+

    int init()
    {
    return(0);
    }
    int start()
    {
    //+------------------------------------------------------------------+
    //| Local variables |
    //+------------------------------------------------------------------+

    if( AccountisNormal == 1 ) {
    if( mm != 0 ) lotsi = MathCeil(AccountBalance() * risk / 10000) ; else lotsi = Lots;
    }
    else {
    if( mm != 0 ) lotsi = MathCeil(AccountBalance() * risk / 10000) / 10 ; else lotsi = Lots;
    }

    if( lotsi > 100 ) lotsi = 100;

    OpenOrders = 0;
    for( cnt = 0; cnt < OrdersTotal(); cnt++ ) {
    OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
    if( OrderSymbol() == Symbol() ) OpenOrders++;
    }
    myh = High[0];
    myl = Low[0];
    myC = Close[0];
    myO = Open[0];
    myyh = High[1];
    myyl = Low[1];
    myyc = Close[1];
    p = (myyh + myyl + myyc + myO) / 4;
    ph = (myyh + myh + myyc + myO) / 4;
    pl = (myyl + myl + myyc + myO) / 4;
    flp = (myh + myl + myC) / 3;
    gap = MathAbs(p - flp) / Point;

    MoveObject("P",OBJ_HLINE,Time[0],p,Time[0],p,Gold,1,STYLE_SOLID);
    SetObjectText("P_txt","Pivot Zone","Arial",7,White);
    MoveObject("P_txt",OBJ_TEXT,Time[0],p,Time[0],p,White);

    if( Ask > p && Ask > flp ) {
    MoveObject("FLP",OBJ_HLINE,Time[0],flp,Time[0],flp,LimeGreen,1,STYLE_SOLID);
    SetObjectText("FLP_txt","Floating Trend Direction - LONG","Arial",7,White);
    MoveObject("FLP_txt",OBJ_TEXT,Time[0],flp,Time[0],flp,White);
    Comment("Account: ",AccountNumber()," - ",AccountName(),"'#10'LastPrice=",LastPrice," Previous open orders=",PreviousOpenOrders,"'#10'Continue opening=",ContinueOpening," OrderType=",MyOrderType,"'#10'",text2," Balance: ",DoubleToStr(AccountBalance(),2),"'#10'Lots=",lotsi,"'#10'",text,"Trend Bias -- LONG");
    }

    if( Bid < p && Bid < flp ) {
    MoveObject("FLP",OBJ_HLINE,Time[0],flp,Time[0],flp,Red,1,STYLE_SOLID);
    SetObjectText("FLP_txt","Floating Trend Direction - SHORT","Arial",7,White);
    MoveObject("FLP_txt",OBJ_TEXT,Time[0],flp,Time[0],flp,White);
    Comment("Account: ",AccountNumber()," - ",AccountName(),"'#10'LastPrice=",LastPrice," Previous open orders=",PreviousOpenOrders,"'#10'Continue opening=",ContinueOpening," OrderType=",MyOrderType,"'#10'",text2," Balance: ",DoubleToStr(AccountBalance(),2),"'#10'Lots=",lotsi,"'#10'",text,"Trend Bias -- SHORT");
    }

    PipValue = 5;
    if (Symbol()== "EURUSDm") PipValue = EURUSDPipValue;
    if (Symbol()== "GBPUSDm") PipValue = GBPUSDPipValue;
    if (Symbol()== "USDJPYm") PipValue = USDJPYPipValue;
    if (Symbol()== "USDCHFm") PipValue = USDCHFPipValue;


    if( PreviousOpenOrders > OpenOrders ) {
    for( cnt = OrdersTotal()-1; cnt >= 0; cnt-- ) {
    OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
    mode = OrderType();
    if( OrderSymbol() == Symbol() ) {
    if( mode == OP_BUY ) OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),slippage,Blue);
    if( mode == OP_SELL ) OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),slippage,Red);
    return(0);
    }
    }
    }

    PreviousOpenOrders = OpenOrders;
    if( OpenOrders >= MaxTrades ) ContinueOpening = False ; else ContinueOpening = True;

    if( LastPrice == 0 ) {
    for( cnt = 0; cnt < OrdersTotal(); cnt++ ) {
    OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
    if( OrderSymbol() == Symbol() ) {
    LastPrice = OrderOpenPrice();
    if(OrderType()==OP_BUY) MyOrderType=2;
    if(OrderType()==OP_SELL) MyOrderType=1;
    }
    }
    }

    if( OpenOrders < 1 ) MyOrderType=0;
    if( OpenOrders < 1 && Bid < p && Bid < flp && gap >= 7 ) {
    LastPrice = 0;
    MyOrderType=1;
    }
    if( OpenOrders < 1 && Ask > p && Ask > flp && gap >= 7 ) {
    LastPrice = 0;
    MyOrderType=2;
    }

    for( cnt = OrdersTotal()-1; cnt >= 0; cnt-- ) {
    OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
    if( OrderSymbol() == Symbol() && Reversed == False ) {
    if( OrderType() == OP_SELL ) {
    if( TrailingStop > 0 ) {
    if( OrderOpenPrice() - Ask >= TrailingStop * Point + Pips * Point ) {
    if( OrderStopLoss() > Ask + Point * TrailingStop || OrderStopLoss() == 0 ) {
    OrderModify(OrderTicket(),OrderOpenPrice(),Ask + Point * TrailingStop,OrderClosePrice() - TakeProfit * Point - TrailingStop * Point,0,Purple);
    return(0);
    }
    }
    }
    }
    if( OrderType() == OP_BUY ) {
    if( TrailingStop > 0 ) {
    if( Bid - OrderOpenPrice() >= TrailingStop * Point + Pips * Point ) {
    if( OrderStopLoss() < Bid - Point * TrailingStop ) {
    OrderModify(OrderTicket(),OrderOpenPrice(),Bid - Point * TrailingStop,OrderClosePrice() + TakeProfit * Point + TrailingStop * Point,0,Yellow);
    return(0);
    }
    }
    }
    }
    }
    }

    Profit = 0;
    LastTicket = 0;
    LastType = 0;
    LastClosePrice = 0;
    LastLots = 0;

    for( cnt = 0; cnt < OrdersTotal(); cnt++ ) {
    OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
    if( OrderSymbol() == Symbol() ) {
    LastTicket = OrderTicket();
    if( OrderType() == OP_BUY ) LastType = 0;
    if( OrderType() == OP_SELL ) LastType = 1;
    LastClosePrice = OrderClosePrice();
    LastLots = OrderLots();
    if( LastType == 0 ) {
    if( OrderClosePrice() < OrderOpenPrice() ) {
    Profit = Profit - (OrderOpenPrice() - OrderClosePrice()) * OrderLots() / Point;
    }
    if( OrderClosePrice() > OrderOpenPrice() ) {
    Profit = Profit + (OrderClosePrice() - OrderOpenPrice()) * OrderLots() / Point;
    }
    }
    if( LastType == 1 ) {
    if( OrderClosePrice() > OrderOpenPrice() ) {
    Profit = Profit - (OrderClosePrice() - OrderOpenPrice()) * OrderLots() / Point;
    }
    if( OrderClosePrice() < OrderOpenPrice() ) {
    Profit = Profit + (OrderOpenPrice() - OrderClosePrice()) * OrderLots() / Point;
    }
    }
    }
    }

    Profit = Profit * PipValue;
    text2 = "Profit: $" + DoubleToStr(Profit,2) + " +/- ";
    if( OpenOrders >= MaxTrades - OrderstoProtect && AccountProtection == 1 ) {
    if( MyOrderType == 2 && Bid == tp ) {
    OrderClose(LastTicket,LastLots,LastClosePrice,slippage,Yellow);
    ContinueOpening = False;
    return(0);
    }
    if( MyOrderType == 1 && Ask == tp ) {
    OrderClose(LastTicket,LastLots,LastClosePrice,slippage,Yellow);
    ContinueOpening = False;
    return(0);
    }
    }

    if( MyOrderType == 1 && ContinueOpening ) {
    if( Bid - LastPrice >= Pips * Point || OpenOrders < 1 ) {
    SellPrice = Bid;
    LastPrice = 0;
    if( TakeProfit == 0 ) tp = 0 ; else tp = SellPrice - TakeProfit * Point;
    if( StopLoss == 0 ) sl = 0 ; else sl = SellPrice + StopLoss * Point;
    if( OpenOrders != 0 ) {
    mylotsi = lotsi;
    for(cnt =0;cnt <OpenOrders;cnt ++) {
    if( MaxTrades > 12 ) mylotsi = NormalizeDouble(mylotsi * 1.5,1) ; else mylotsi = NormalizeDouble(mylotsi * 2,1);
    }
    }
    else {
    mylotsi = lotsi;
    }
    if( mylotsi > 100 ) mylotsi = 100;
    OrderSend(Symbol(),OP_SELL,mylotsi,SellPrice,slippage,sl,tp,"",0,0,Red);
    return(0);
    }
    }

    if( MyOrderType == 2 && ContinueOpening ) {
    if( LastPrice - Ask >= Pips * Point || OpenOrders < 1 ) {
    BuyPrice = Ask;
    LastPrice = 0;
    if( TakeProfit == 0 ) tp = 0 ; else tp = BuyPrice + TakeProfit * Point;
    if( StopLoss == 0 ) sl = 0 ; else sl = BuyPrice - StopLoss * Point;
    if( OpenOrders != 0 ) {
    mylotsi = lotsi;
    for(cnt =0;cnt <OpenOrders;cnt ++) {
    if( MaxTrades > 12 ) mylotsi = NormalizeDouble(mylotsi * 1.5,1) ; else mylotsi = NormalizeDouble(mylotsi * 2,1);
    }
    }
    else {
    mylotsi = lotsi;
    }
    if( mylotsi > 100 ) mylotsi = 100;
    OrderSend(Symbol(),OP_BUY,mylotsi,BuyPrice,slippage,sl,tp,"",0,0,Blue);
    return(0);
    }
    }

    return(0);
    }

  5. #5
    Piplet Akulascalper's Avatar
    Join Date
    Dec 2008
    Posts
    12
    FXO Shares
    0
    FXO Bonus
    0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Kpd Master MQL4 Coder

    Sila modified script EA ni utk menambah baik entry & exit --- supaya lebih profitable. Dan share kat sini.

    Sekian.

  6. #6
    Piplet Akulascalper's Avatar
    Join Date
    Dec 2008
    Posts
    12
    FXO Shares
    0
    FXO Bonus
    0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Code EA Steinitz Page 1

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

    #include <stdlib.mqh>

    int gi_76 = 67890;
    extern int YourAccountNumber = 12345;
    bool gi_84 = FALSE;
    int gi_88 = 9;
    int gi_92 = 10;
    int gi_96 = 2027;
    extern string MTF_HAS_METHOD = "InventorON STEINITZ";
    extern string PROGRAMMERS = "LEE YAN, Robert Hill";
    extern string ContackUS = "[email protected] ; [email protected]";
    extern int MagicBase = 20000;
    extern string cm = "---User Comment---";
    extern string UserComment = "HAS_Hedge";
    extern string HedgeUserComment = "HAS_Hedge1";
    extern string has = "---HAS Inputs---";
    extern int MaMethod = 2;
    extern int MaPeriod = 6;
    extern int MaMethod2 = 3;
    extern int MaPeriod2 = 2;
    extern string tf0 = "---TimeFrames---";
    extern string tf1 = "1. Month";
    extern string tf2 = "2. Week";
    extern string tf3 = "3. Day";
    extern string tf4 = "4. 4 Hour";
    extern string tf5 = "5. 1 Hour";
    extern string tf6 = "6. 30 minute";
    extern string tf7 = "7. 15 minute";
    extern string tf8 = "8. 5 minute";
    extern int HigherTF_Set1 = 1;
    extern int LowerTF_Set1 = 8;
    extern int UpperTF_Set1 = 1;
    extern string ss = "---Set 2 inputs---";
    extern string ss1 = " Switch inputs when";
    extern string ss2 = " UpperTF to SwitchTF do not agree";
    extern string ss3 = "Enter 0 for false, 1 for true";
    extern int UseSwitchSet = 1;
    extern int SwitchSetTF = 3;
    extern int HigherTF_Set2 = 4;
    extern int LowerTF_Set2 = 8;
    extern string ct = "---Trade Confirmation filters---";
    extern string ct1 = " Use timeframe above HigherTF to confirm trade";
    extern string ct2 = "Enter 0 for false, 1 for true";
    extern int ConfirmUpperTimeFrame_Set1 = 1;
    extern int ConfirmUpperTimeFrame_Set2 = 1;
    extern string ct3 = "Confirm Higher to Upper Timeframes for change of trend";
    extern string ct4 = "Enter 0 for false, 1 for true";
    extern int ConfirmAllTimeFrames_Set1 = 1;
    extern int ConfirmAllTimeFrames_Set2 = 1;
    extern string ct5 = "Confirm Alert Timeframe for change of trend";
    extern string ct6 = "Enter 0 for false, 1 for true";
    extern int ConfirmAlertTimeFrame = 1;
    extern string en0 = "--- Timeframe Entry---";
    extern string en1 = "1. Enter on Alerted time frame - 1 unclosed candle";
    extern string en2 = "2. Enter on Alerted time frame - 1 closed candle";
    extern int EnterOnAlerted = 1;
    extern string hen = "--- HedgeTimeframe Entry---";
    extern string hen0 = "0. Do Not Use Hedge";
    extern string hen1 = "1. Enter on Alerted time frame - 1";
    extern string hen2 = "2. Enter on Alerted time frame";
    extern int HedgeEnterOnAlerted = 0;
    extern string en3 = "Fresh Signal - Enter 0 for false, 1 for true";
    extern int EnterOnFreshSignal = 0;
    extern int Slippage = 3;
    extern string ep = "--- Profit Timeframe Exit---";
    extern string ep0 = "0. Do Not Use";
    extern string ep1 = "1. Alert Timeframe - 1 unclosed candle";
    extern string ep2 = "2. Alert Timeframe - 1 closed candle";
    extern string ep3 = "3. Alert Timeframe unclosed candle";
    extern string ep4 = "4. Alert Timeframe closed candle";
    extern string ep5 = "5. Exit at Take Profit";
    extern int ExitOnAlertedProfit_Set1 = 5;
    extern int ExitOnAlertedProfit_Set2 = 5;
    extern int HedgeExitOnAlertedProfit = 1;
    extern string e5 = "--- Partial Close---";
    extern string e6 = "When true will close half of position";
    extern string e7 = "when internal TakeProfit or Trigger is reached";
    extern string e8 = "Enter 0 for false, 1 for true";
    extern int UsePartialClose_Set1 = 0;
    extern int UsePartialClose_Set2 = 0;
    bool gi_572 = FALSE;
    bool gi_576 = FALSE;
    bool gi_580 = FALSE;
    extern string e9 = "Roundup - Enter 0 for false, 1 for true";
    extern int RoundUp = 0;
    extern string ep6 = " Enter trigger to replace TP";
    extern string ep7 = " for alert exit, partial close";
    extern string ep8 = " and Trailing Stop";
    extern string ep9 = "UseTrigger - Enter 0 for false, 1 for true";
    extern int UseTrigger_Set1 = 1;
    extern int ExitTrigger_Set1 = 25;
    extern int UseTrigger_Set2 = 1;
    extern int ExitTrigger_Set2 = 20;
    bool gi_644 = FALSE;
    extern int HedgeUseTrigger = 1;
    extern int HedgeExitTrigger = 10;
    bool gi_656 = FALSE;
    extern string set = "---Exit at Set Change Signal---";
    extern int UseExitOnSetChangeSignal = 0;
    extern string hd = " --Delay time after small loss--";
    extern int useDelayAfterLoss = 1;
    extern int LossSizeInPips = 10;
    extern int MinutesToDelay = 30;
    extern string ts0 = "---TrailingStopLoss---";
    extern string ts1 = " 1. None";
    extern string ts2 = " 2. BreakEven at TP or Trigger";
    extern string ts3 = " 3. Standard at TP or Trigger";
    extern string ts6 = " 4. Breakeven at input";
    extern string ts5 = " 5. Standard at input";
    extern string ts4 = " 6. Trail immediately";
    extern string ts7 = " 7. Immediately til Breakeven + Lockin";
    extern int TrailingStopMethod_Set1 = 2;
    extern int TrailingStopMethod_Set2 = 2;
    extern int HedgeTrailingStopMethod = 2;
    extern string ts8 = "2. BreakEven at TP/Trigger setting";
    extern int BreakEvenLock_Set1 = 20;
    extern int BreakEvenLock_Set2 = 15;
    extern int HedgeBreakEvenLock = 5;
    extern string ts9 = "3. Standard at TP/Trigger setting";
    extern int TrailingStop = 25;
    extern int HedgeTrailingStop = 25;
    extern string ts11 = "4. Breakeven at input settings";
    extern double BreakEvenLevel = 30.0;
    extern int LockInPips = 5;
    extern double HedgeBreakEvenLevel = 10.0;
    extern int HedgeLockInPips = 1;
    extern string ts10 = "5. Standard at input setting";
    extern double BeginTrailingStop = 35.0;
    extern double HedgeBeginTrailingStop = 15.0;
    extern string tp0 = "---TakeProfit Method---";
    extern string tp1 = " 1. Use ATR";
    extern string tp2 = " 2. Use Inputs";
    extern int TPMethod = 2;
    extern string tp3 = "ATR inputs";
    extern int TPAtrPeriod = 14;
    extern double TPAtrPercentage = 0.9;
    extern string tp4 = "TakeProfit inputs";
    extern int TakeProfitW1_Set1 = 200;
    extern int TakeProfitD1_Set1 = 150;
    extern int TakeProfitH4_Set1 = 100;
    extern int TakeProfitH1_Set1 = 75;
    extern int TakeProfitM30_Set1 = 50;
    extern int TakeProfitM15_Set1 = 25;
    extern int TakeProfitM5_Set1 = 15;
    extern int TakeProfitW1_Set2 = 200;
    extern int TakeProfitD1_Set2 = 150;
    extern int TakeProfitH4_Set2 = 100;
    extern int TakeProfitH1_Set2 = 75;
    extern int TakeProfitM30_Set2 = 50;
    extern int TakeProfitM15_Set2 = 25;
    extern int TakeProfitM5_Set2 = 15;
    extern int HedgeTakeProfit = 20;
    extern double SafetyTakeProfitMultiplier = 1.5;
    int g_global_var_984;
    int gi_988;
    extern string tms6 = "Step to move Take Profit";
    extern int TP_Step = 20;
    int g_global_var_1004;
    int gi_1008;
    extern string sl0 = "---StopLoss Method---";
    extern string sl1 = " 1. Use ATR";
    extern string sl2 = " 2. Use Input";
    extern int SLMethod = 2;
    extern string sl3 = "ATR inputs";
    extern int SLAtrPeriod = 14;
    extern double SLAtrPercentage = 0.9;
    extern int mStopLoss_Set1 = 0;
    extern int mStopLoss_Set2 = 0;
    extern int mHedgeStopLoss = 0;
    extern double SafetyStopLossMultiplier = 1.5;
    int gi_1080;
    int gi_1084;
    int gi_1088;
    int gi_1092;
    extern string mm = "---Money Management---";
    extern double Lots = 0.1;
    extern int HedgeMultiplier = 1;
    extern bool UseMoneyManagement = TRUE;
    extern bool BrokerIs**** = FALSE;
    extern bool BrokerIsCrownForex = FALSE;
    extern string m1 = "Set mini and micro to false for standard account";
    extern bool AccountIsMini = TRUE;
    extern bool AccountIsMicro = FALSE;
    extern double TradeSizePercent = 1.0;
    extern bool BrokerPermitsFractionalLots = TRUE;
    extern string sp0 = "---Large Spread Filter---";
    extern bool UseSpreadDetection = TRUE;
    extern int MaxSpread = 8;
    extern string ex1 = " Close trades after X Days";
    extern string ex2 = "Enter 0 for do not use";
    extern int CloseTradeAfterX_Days = 0;
    string gs_unused_1192 = " Close trades at End Of Month";
    string gs_unused_1200 = "Enter 0 for false, 1 for true";
    int gi_1208 = 0;
    int gi_1212 = 0;
    int gi_1216 = 5;
    extern string ef1 = " Close trades on Friday";
    extern string ef2 = "Enter 0 for false, 1 for true";
    extern int UseFridayClose = 0;
    extern int FridayCloseHour = 21;
    extern string ef3 = "Friday No Trade - Enter 0 for false, 1 for true";
    extern int UseFridayNoTradeTime = 0;
    extern int FridayFinalHour = 20;
    int gi_1260;
    int gi_1264;
    extern string sm0 = "--Trading Hours Filter--";
    extern string sm2 = "UseTradingHours - Enter 0 for false, 1 for true";
    extern int UseTradingHours = 0;
    int gi_1288 = 0;
    extern bool UseDST = TRUE;
    extern string sm4 = "TradeAsian - Enter 0 for false, 1 for true";
    extern int TradeAsianMarket = 1;
    extern int myAsianStart = 100;
    extern int myAsianStop = 400;
    extern string sm5 = "Trade Europe - Enter 0 for false, 1 for true";
    extern int TradeEuropeanMarket = 1;
    extern int myEurStart = 1000;
    extern int myEurStop = 1200;
    extern string sm6 = "Trade NY - Enter 0 for false, 1 for true";
    extern int TradeNewYorkMarket = 1;

  7. #7
    Piplet Akulascalper's Avatar
    Join Date
    Dec 2008
    Posts
    12
    FXO Shares
    0
    FXO Bonus
    0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Code EA Steinitz Page 2

    extern int myNYStart = 1600;
    extern int myNYStop = 1800;
    extern string to = "---Text Object Settings---";
    extern int StatusTxtSize = 10;
    extern color StatusColor = White;
    extern int CommentTxtSize = 10;
    extern color CommentColor = White;
    extern int TradeSetTxtSize = 10;
    extern color TradeSetColor = White;
    extern int TrendTxtSize = 10;
    extern color TrendColor = White;
    extern int LookingTxtSize = 10;
    extern color LookingColor = White;
    extern int FoundTxtSize = 10;
    extern color FoundColor = White;
    extern int WaitingTxtSize = 10;
    extern color WaitingColor = White;
    extern int ConditionTxtSize = 10;
    extern color ConditionColor = White;
    extern int TradeTxtSize = 10;
    extern color TradeColor = White;
    extern int DrawDownTxtSize = 10;
    extern color DrawDownColor = White;
    extern color MarkColor = Red;
    int gi_1448;
    int gi_1452;
    int gi_1456;
    int gi_1460;
    int gi_1464;
    int gi_1468;
    int gi_1472;
    int gi_1476;
    int gi_1480;
    int gi_1484;
    int gi_1488;
    int gi_1492;
    int gi_1496;
    int gi_1500;
    int gi_1504;
    string gs_1508;
    string gs_1516;
    string gs_1524;
    string gs_1532;
    string gs_1540;
    string gs_1548;
    string gs_1556;
    string gs_1564;
    string gs_1572;
    string gs_1580;
    string gs_1588;
    string gs_1596;
    string gs_1604;
    string gs_1612;
    string gs_1620;
    string g_name_1628;
    extern string db = "--- Debug file settings---";
    extern bool Debug = FALSE;
    extern bool Debug_Expert = FALSE;
    extern bool Debug_LiveTrade = FALSE;
    extern string Trade_Log = "_MTF_HAS_TradeLog";
    extern bool Debug_BackTestTrade = FALSE;
    extern string BT_Trade_Log = "_MTF_HAS_BTTradeLog";
    bool gi_1676 = TRUE;
    bool gi_1680 = TRUE;
    int gi_1684;
    int gi_1688;
    int gi_1692;
    bool gi_unused_1696 = FALSE;
    int g_global_var_1700 = 0;
    int g_global_var_1704 = 0;
    int gi_1708 = 0;
    int gi_1712;
    bool g_global_var_1716;
    int g_global_var_1720 = 0;
    int g_global_var_1724 = 0;
    bool g_global_var_1728;
    int gi_1732;
    int gi_1736;
    int gi_1740;
    string g_name_1744;
    string gs_dummy_1752;
    string gs_1760 = "MTF HAS Status";
    double g_icustom_1768;
    double g_icustom_1776;
    double gd_1784;
    double gd_1792;
    double gd_1800;
    double gd_1808;
    int g_ticket_1816;
    int g_ticket_1820;
    int gi_1824;
    int gi_1828;
    int gi_1832;
    int gi_1836;
    int gi_1840;
    int gi_1844;
    int g_global_var_1848 = 1;
    int gi_1852;
    int gi_1856;
    int gi_1860;
    int gi_1864;
    int gi_1868;
    int gi_1872;
    int gi_1876;
    int gi_1880;
    int gi_1884;
    int gi_1888;
    int gi_1892;
    int gi_1896;
    int gi_1900;
    int gi_1904;
    int gi_1908;
    int gi_1912;
    int gi_1916;
    int gi_1920;
    int gi_1924;
    double gd_1928;
    int g_magic_1936;
    int g_magic_1940;
    string g_var_name_1944;
    string g_var_name_1952;
    string g_var_name_1960;
    string g_var_name_1968;
    string g_var_name_1976;
    string g_var_name_1984;
    string g_var_name_1992;
    string g_var_name_2000;
    string g_var_name_2008;
    string g_var_name_2016;
    string g_var_name_2024;
    string g_var_name_2032;
    string g_var_name_2040;
    string g_var_name_2048;
    string g_var_name_2056;
    string g_var_name_2064;
    string g_var_name_2072;
    string g_var_name_2080;
    string g_var_name_2088;
    string g_var_name_2096;
    string g_var_name_2104;
    string g_var_name_2112;
    string g_var_name_2120;
    string g_var_name_2128;
    string g_var_name_2136;
    string g_var_name_2144;
    string g_var_name_2152;
    string g_var_name_2160;
    bool gi_2168 = FALSE;
    double g_global_var_2172;
    double gd_2180;
    double g_global_var_2188;
    double gd_2196;
    int gi_2204 = 5;
    int gi_2208 = 1000;
    int gia_2212[9] = {43200, 10080, 1440, 240, 60, 30, 15, 5, 1};
    string gs_2216 = "";

    int init() {
    int li_0;
    gi_2168 = FALSE;
    if (IsTesting() == TRUE) {
    gi_2168 = TRUE;
    if (Debug_LiveTrade == TRUE) Debug_LiveTrade = FALSE;
    }
    if (IsTesting() == FALSE && Debug_BackTestTrade == TRUE) Debug_BackTestTrade = FALSE;
    if (IsDemo() == TRUE) gi_2168 = TRUE;
    if (gi_2168 == FALSE) gi_2168 = CheckAccountNumber();
    if (gi_2168 == TRUE) {
    g_magic_1936 = MagicBase + 100 * func_Symbol2Val(Symbol()) + func_TimeFrame_Const2Val(Period());
    g_magic_1940 = g_magic_1936 + 1;
    DeleteExistingLabels();
    SetupLabels();
    ClearLabels();
    CorrectTimeFilterSettings();
    gd_1928 = SetPoint();
    if (CheckSet() == 1) {
    gi_1676 = TRUE;
    if (gi_84 == FALSE) OutputStatusToChart(gs_1760 + " INITIALIZED SUCCESSFULLY");
    else OutputStatusToChart(gs_1760 + "- Expires on " + gi_88 + "/" + gi_92 + "/" + gi_96);
    gi_1680 = TRUE;
    if (UseFridayClose == 1) UseFridayNoTradeTime = TRUE;
    gi_1260 = FridayCloseHour;
    if (FridayFinalHour < FridayCloseHour) gi_1264 = FridayFinalHour;
    else gi_1264 = FridayCloseHour - 1;
    if (UseDST) {
    gi_1260 = FridayCloseHour - 1;
    gi_1264 = FridayFinalHour - 1;
    }
    if (Debug == TRUE) SetupLogFiles();
    gi_1708 = 0;
    gi_1712 = 0;
    GetGlobalVars();
    li_0 = CalculateCurrentOrders(g_magic_1936);
    if (li_0 == 0) {
    g_global_var_1848 = GetCorrectInputSet(g_global_var_1848, 0);
    g_global_var_1700 = 0;
    g_global_var_1704 = FALSE;
    SaveAlertTimeFrame(g_global_var_1700);
    SaveEntryTimeFrame(g_global_var_1704);
    } else g_global_var_1848 = GetCorrectInputSet(g_global_var_1848, 1);
    SaveTradeSet(g_global_var_1848);
    gi_1732 = gia_2212[gi_1852 - 1];
    gi_1736 = gia_2212[gi_1856 - 1];
    gi_1740 = gia_2212[gi_1860 - 1];
    start();
    } else {
    gi_1676 = FALSE;
    OutputStatusToChart(gs_1760 + "INITIALIZED UNSUCCESSFULLY");
    }
    }
    return (0);
    }

    int deinit() {
    if (Debug == TRUE) CloseLogFiles();
    ClearLabels();
    DeleteExistingLabels();
    return (0);
    }

    int CheckSet() {
    if (HigherTF_Set1 < 1 || HigherTF_Set1 > 8) {

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Disclaimer
2005-2016 © FXOpen All rights reserved. Various trademarks held by their respective owners.

Risk Warning:: Trading on the Forex market involves substantial risks, including complete possible loss of funds and other losses and is not suitable for all members. Clients should make an independent judgment as to whether trading is appropriate for them in the light of their financial condition, investment experience, risk tolerance and other factors.

FXOpen Markets Limited, a company duly registered in Nevis under the company No. C 42235. FXOpen is a member of The Financial Commission.

FXOpen AU Pty Ltd., a company authorised and regulated by the Australian Securities & Investments Commission (ASIC). AFSL 412871ABN 61 143 678 719.

FXOpen Ltd. a company registered in England and Wales under company number 07273392 and is authorised and regulated by the Financial Conduct Authority (previously, the Financial Services Authority) under FCA firm reference number 579202.

FXOpen does not provide services for United States residents.

Join us