Trade FOREX with FXCM

  • Award-Winning Platform
  • 24/7 Customer Support
  • Trade Directly on Charts
  • Free $50K Practice Account
Register


Results 61 to 75 of 114
Page 5 of 8 FirstFirst 1 2 3 4 5 6 7 8 LastLast

Thread: MT4 Expert Advisors

  1. #61
    MisterFX is offline Registered
    Join Date
    Feb 2009
    Posts
    3
    Yes it is a Hidden Stoploss.
    http://m-t-a-w.com
    Regards
    Last edited by MisterFX; 01-16-2010 at 03:39 AM.

  2. #62
    MisterFX is offline Registered
    Join Date
    Feb 2009
    Posts
    3
    yea thats true
    Regards

  3. #63
    fxalgotrader is offline Member
    Join Date
    Aug 2009
    Posts
    7

    Error 138

    There's not much wrong with your OrderClose syntax. When the broker's trade server rejects the order in fast markets you'll get a 138 error ie a requote. You need to write code to handle a requote error and re-submit the Orderclose requests.

    You can create a wide array of error handling code for both execution and exit. I use a an external library file which contains generic order execution and exit functions to cater for these issues.

    Google fxalgotrader to see more on this.

    Hope this helps.

    FX Algotrader

  4. #64
    aqlan's Avatar
    aqlan is offline Member
    Join Date
    Aug 2008
    Posts
    5

    Thumbs up MT4 to FXCM Bridge

    With this tool you can run any EA for standard FXCM Trade Station. All your trades in MT4 will be transferred instantly to FXCM account. Support Market open, Market close, create pending orders and delete pending orders.

    Installation:

    1. Download the package.
    2. Through installation choose METATRADER FOLDER as destination.
    3. Run MT4 and attach LetsFX-MT2CM expert to any chart.
    4. Fill your FXCM login at Input of EA dialog.


    Limitations:
    1. Send orders to only one FXCM account.
    2. Does not modify pending orders, stoploss or takeprofit.

    Requirements:
    You have to install FXCM runtime library on your computer from this link: FXCM Order2go runtime

  5. #65
    eka_sutikna is offline Registered User
    Join Date
    Mar 2010
    Posts
    1

    profit from sleep

    i just wanna show this EA results
    and other results are here

    http://profitfromsleep.blogspot.com/
    Attached Images Attached Images  
    Last edited by eka_sutikna; 03-09-2010 at 07:56 AM.

  6. #66
    igalco14 is offline Member
    Join Date
    Aug 2009
    Posts
    10

    New Expert Advisor

    Hello to all
    i don't know if you heared about Vladimir rebakuv but this guy already created 3 Expert Advisors:
    1.Broker nightmare.
    2.forex nightfox
    3.srs trend rider.
    All of them were greate success and now he is coming with a new one:
    Black Panther, i found a review about this product:

    Forex Black Panther

    Tell me what is you opinion about this product and what do you think about the rest of hiw products!

  7. #67
    barnix is offline Registered User
    Join Date
    May 2008
    Posts
    1
    Better EA results:
    FOREX*PAMM

  8. #68
    supa is offline Member
    Join Date
    Oct 2009
    Posts
    31

    HOW TO CONTROL BAR OPENING IN EA

    Hi Jason, Luke and everybody here,

    Please I have an EA that I am working on, however, the start() function is being executed at every tick. I want the start() function to be executed at the close of each bar (say if attached to a one hour chart) and not at every tick.

    My code snippet to control bar opening time is pasted below but it is not working as expected as new ticks still get processed within bars.

    static int pTime=0;
    if((pTime==Time[0]) && (CurTime() - pTime) > 3600) {
    newBarOpened = false;
    } else {
    newBarOpened = true;
    }

    Are you or anybody i this forum able to help me with a snippet to control bar opening time?

    ta

    supa

  9. #69
    alexredcliff is offline Registered User
    Join Date
    Apr 2010
    Posts
    4

    Thumbs up New Fish Forex Robot

    Hi!

    Want to recommend you the new EA made by a woman and her team - this is Rita Lasker's FishForexRobot. Now it is sold on a lower price than it really costs, because it is pretty new at the market, though worthful. So, do not loose time! By the way, firstly you may visit her free robot site - robot4free.

  10. #70
    molanis is offline Member
    Join Date
    Nov 2009
    Posts
    10
    You need to do this:
    When opening trades - do not include the stops
    After the order is opened, modify it adding the stops
    Some ECNs do not accept partial closing

    You can use molanis strategy builder, it creates the ea for you - ready for ecn (Molanis Strategy Builder for MetaTrader)

  11. #71
    CapeCoddah is offline Registered User
    Join Date
    Apr 2010
    Posts
    3
    Quote Originally Posted by supa View Post
    Hi Jason, Luke and everybody here,

    Please I have an EA that I am working on, however, the start() function is being executed at every tick. I want the start() function to be executed at the close of each bar (say if attached to a one hour chart) and not at every tick.

    My code snippet to control bar opening time is pasted below but it is not working as expected as new ticks still get processed within bars.

    static int pTime=0;
    if((pTime==Time[0]) && (CurTime() - pTime) > 3600) {
    newBarOpened = false;
    } else {
    newBarOpened = true;
    }

    Are you or anybody i this forum able to help me with a snippet to control bar opening time?

    ta

    supa
    This is what I use

    bool Continue_Processing(int CheckFrequency, int CheckInterval, datetime TimeStamp, int ThisMinute, int TheBarShift)
    // not all code in in function is shown
    if(CurrentTimeStamp != TimeStamp) //Process once per bar on bar open
    {
    TheBarShift = 1;
    CurrentTimeStamp = TimeStamp;
    return(true);
    }
    else return(false);

    ....
    bool continueprocessing =Continue_Processing( CheckFrequency, CheckInterval, Time[0], TimeMinute(TimeCurrent()), BarShift);

    also rather than make pTime static, just make it global as that is what it is, just don't use it in any of your other functions.


    Now, I have a problem. I want to place pending orders just above/below the Current BID and I assume I have to add the "stoplevel" to the BID to get a valid pending order. When I execute the following code on FXCM I get a return value of zero for stoplevel.

    RefreshRates();
    double stoplevel=MarketInfo(Symbol(),MODE_STOPLEVEL);

    I have executed the same code on FXDD and it works fine.

    Is it an implementation Bug with FXCM and if so, are there any workarounds to get a good estimate of the stoplevel. I have considered a recursive function that adds a pip to the BID until the pending order is placed.

    I also have a second question. I have a high speed quad processor and am testing my EA on several demo accounts simultaneously. The foreground EA seems to work correctly but I have instances where the background EAs are "going to sleep" e.g. not processing on every new bar. Is this due to a lack of cpu cycles for the background processes or is it a MT4 limitation.

    Thanks for any information

  12. #72
    fxalgotrader is offline Member
    Join Date
    Aug 2009
    Posts
    7
    Quote Originally Posted by supa View Post
    Hi Jason, Luke and everybody here,

    Please I have an EA that I am working on, however, the start() function is being executed at every tick. I want the start() function to be executed at the close of each bar (say if attached to a one hour chart) and not at every tick.

    My code snippet to control bar opening time is pasted below but it is not working as expected as new ticks still get processed within bars.

    static int pTime=0;
    if((pTime==Time[0]) && (CurTime() - pTime) > 3600) {
    newBarOpened = false;
    } else {
    newBarOpened = true;
    }

    Are you or anybody i this forum able to help me with a snippet to control bar opening time?

    ta

    supa
    Hi, noticed there didn't seem to be an answer to your question. The start function will always be run when an incoming tick is received on the MT4 chart your EA or indicator is loaded on.

    If you wanted to optimise your EA/Indy to only run when a new bar was created on the chart you would just write a new bar sensing function so that when the number of bars on the chart changed you would allow your routines to execute. You can easily write a little function using the 'Bars' integer function which tells you the number of bars on the current chart. Just call your created function from start() and don't put any code in start() which doesn't need to be executed on each tick. Let me know if you need an example.

    Cheers
    FXAlgoTrader - Algorithmic Systems and Tool Developer

  13. #73
    SarahW is offline Registered User
    Join Date
    Jun 2010
    Posts
    2

    Trouble to run the EA

    Hello guys,

    my name is Sarah and I am trading since a few years. Last year I decided to trade with the mt4 because it suits me.

    This year I would like to open a mt4 account with FXCM. Unfortunately I have really trouble to run it on the software in the demo account.

    For some reason, which I dont know, this ea is opening and closing when he likes to do. Mostly after the 3. position he stops complete.

    The funny thing about this ea is, he is running perfect without problems with Alpari (5 digits too) and in any 4 digit broker.

    I called a technic guy - he said I have to write it for 5 digits : It is written for 5 digit, but still the same problem.

    Has anyone else the same expirience made or could someone help`?

    Thanks a lot Sarah
    (Sorry for my english, but I am not nativ speaking)

  14. #74
    fxalgotrader is offline Member
    Join Date
    Aug 2009
    Posts
    7
    SarahW,

    What's the EA? What does it do? Who wrote it? It should be able to handle fractional pricing if it's been written properly

    FXAlgoTrader - Algorithmic Systems and Tool Developer
    Last edited by fxalgotrader; 06-05-2010 at 11:04 AM. Reason: typo

  15. #75
    SarahW is offline Registered User
    Join Date
    Jun 2010
    Posts
    2
    Quote Originally Posted by fxalgotrader View Post
    SarahW,

    What's the EA? What does it do? Who wrote it? It should be able to handle fractional pricing if it's been written properly

    FXAlgoTrader - Algorithmic Systems and Tool Developer
    The EA is very simple based on the AO-Filter. The Terms to open and close are very simple. Because when the signal for a buy ist there, the ea will close the open sell and open a buy. If the signal for a sell is given, than the open buy will be closed and the sell will be opened.

    In addition are the opportunities run the moneymanagement and the SL/TP manually.

    It was written by a guy who programs ea's for the mt4.

    Fractional pricing - no, idea ... therefore I am to blond.
    I just wonder that this ea is running with Alpari (5 digit) without any problems.And the real funny thing is, in the backtest he shows every single signal - but unfortunately he is not doing this in real.

    But in anyway ... here is the code for the ea. May you can see an error.

    Sarah

    extern int Puffer=3;
    extern int Abstand=1;
    extern int Magic=100526;
    extern bool TpSlBeachten=false;
    extern int TP=100;
    extern int SL=100;
    extern string Lotstring="Lotberechnung=false wird die Lotsgröße unten genommen";
    extern string Lotstring2="Lotberechnung=true wird es von Acc abhängig sein";
    extern bool Lotberechnung=false;
    extern double Lotgroesse=0.1;
    extern string Lotstring3="Parameter für Lotberechnung";
    extern int Faktor=5000;
    double Lots;

    //+------------------------------------------------------------------+
    //| expert initialization function |
    //+------------------------------------------------------------------+
    int init()
    {
    //----

    //----
    return(0);
    }
    //+------------------------------------------------------------------+
    //| expert deinitialization function |
    //+------------------------------------------------------------------+
    int deinit()
    {
    //----

    //----
    return(0);
    }
    //+------------------------------------------------------------------+
    //| expert start function |
    //+------------------------------------------------------------------+
    int start()
    {
    //----

    static bool long=false;
    static bool short=false;
    static int ticket;
    static int Balken;
    static bool firsttrade=false;
    bool longonly=false, shortonly=false;
    static double longeinstiegspreis=100000, shorteinstiegspreis=0;
    double indi1, indi2;

    if (Balken!=Bars)
    {
    Balken=Bars;
    firsttrade=true;
    }

    // Lotgrößenberechnung
    if (Lotberechnung)
    Lots=AccountBalance()/Faktor;
    else
    Lots=Lotgroesse;

    indi1=iCustom(NULL, 0, "iRosiDiff2",0,1);
    indi1=iCustom(NULL, 0, "iRosiDiff2",1,1);

    if (Close[0]>High[1]+(Abstand*Point*10) && indi1==0)
    longonly=true;
    if (Close[0] shortonly=true;



    //Comments
    Comment( "\n eRosiTeil2",
    "\n\n T R A D E S E S S I O N",
    "\n*=====================*",
    "\n Broker Time = ", Hour()+" : "+Minute(),

    "\n*=====================*",
    "\n L O T S = " + Lots,
    "\n B A L A N C E = " + DoubleToStr(AccountBalance(),2),
    "\n S P R E A D = " + (Ask-Bid)/Point*10,
    "\n*=====================*",
    "\n L O N G = " + long,
    "\n S H O R T = " + short,
    "\n Ticket = "+ticket,
    "\n TpSlBeachten = "+TpSlBeachten,
    "\n TP = "+TP,
    "\n SL = "+SL,
    "\n*=====================*");
    WindowRedraw();


    //EXIT
    if (long)
    {
    OrderSelect(ticket,SELECT_BY_TICKET);
    if (Close[0]>OrderOpenPrice()+(TP*Point*10) && TpSlBeachten)
    {
    fSi---it (ticket,long, short,Puffer,"TP");
    }
    if (Close[0] {
    fSi---it (ticket,long, short,Puffer,"SL");
    }
    if (shortonly)
    {
    fSi---it (ticket,long, short,Puffer,"LongAufShort");
    }
    }
    if (short)
    {
    OrderSelect(ticket,SELECT_BY_TICKET);
    if (Close[0] {
    fSi---it (ticket,long, short,Puffer,"TP");
    }
    if (Close[0]>OrderOpenPrice()+(SL*Point*10) && TpSlBeachten)
    {
    fSi---it (ticket,long, short,Puffer,"SL");
    }
    if (longonly)
    {
    fSi---it (ticket,long, short,Puffer,"ShortAufLong");
    }
    }


    //Position öffnen
    if (!long && !short && firsttrade)
    {
    if (longonly)
    {
    ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,"eRosiDiffLong",Magic,0,Green);
    if(OrderSelect(ticket,SELECT_BY_TICKET))
    {
    Print("Buy order opened : ",OrderOpenPrice());
    long=true;
    firsttrade=false;
    }
    else Print("Error opening Buy order : ",GetLastError());
    }

    if (shortonly)
    {
    ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,0,"eRosiDiffShort",Magic,0,Red);
    if(OrderSelect(ticket,SELECT_BY_TICKET))
    {
    Print("Sell order opened : ",OrderOpenPrice());
    short=true;
    firsttrade=false;
    }
    else Print("Error opening Sell order : ",GetLastError());
    }
    }

    //----
    return(0);
    }
    //+------------------------------------------------------------------+

    void fSi---it (int uticket,bool& ulong, bool& ushort, int upuffer, string exitstring)
    {
    OrderSelect(uticket,SELECT_BY_TICKET);
    if (OrderType()==OP_BUY && ulong)
    {
    if (OrderClose(OrderTicket(),OrderLots(),Bid,upuffer,Violet))
    {
    Print(exitstring," Longexit order at : ",OrderClosePrice(),"Ticket: ",uticket);
    ulong=false;
    }
    else Print(exitstring," Error closing Longexit order : ",GetLastError(),"Ticket: ",uticket);

    }
    if (OrderType()==OP_SELL && ushort)
    {

    if (OrderClose(OrderTicket(),OrderLots(),Ask,upuffer,Violet))
    {
    Print(exitstring," Shortexit order at : ",OrderClosePrice(),"Ticket: ",uticket);
    ushort=false;
    }
    else Print(exitstring," Error closing Shortexit order : ",GetLastError(),"Ticket: ",uticket);
    }
    }

Page 5 of 8 FirstFirst 1 2 3 4 5 6 7 8 LastLast

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: Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with foreign exchange trading, and seek advice from an independent financial advisor if you have any doubts. Any opinions, news, research, analyses, prices, or other information contained on this website is provided as general market commentary and does not constitute investment advice. Forex Capital Markets LLC. will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information.