Jump to content

leonfoo

Members
  • Posts

    41
  • Joined

  • Last visited

Posts posted by leonfoo

  1. i'm trying to make up a code to know the total time for each open order. below is the code.

     

    for(int nCnt=OrdersTotal(); nCnt>=0; nCnt--) {

    if (!OrderSelect(nCnt,SELECT_BY_POS)) continue;

    if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic) {

    double tmp = (TimeCurrent()-OrderOpenTime())/3600.0;

    Print("Current trade Duration is ",NormalizeDouble(tmp,8));

    }

    }

     

    but the log shows for every trade is "Current trade Duration is 0".

    can anyone advice what went wrong?

  2. Hi All. i'm new in to this EA where notice that when enable the news filtering; it don't show any result in the backtest.

    by referring to the codes, it should bypass the "IsTesting()" when backtest is in process. so, I'm suggesting the following and request feedback if the coding have any fault.

    //*************************************************************************

    bool News() {

    if(IsTesting()) return (1);

    if(AvoidNews && Minute() != g_minute_296) {

    if (High_Impact) {

    int MinSinceHighNews=iCustom(NULL, 0, "FFCal", 1, 0, 0, 1, 1, 1, 0);

    int MinUntilHighNews=iCustom(NULL, 0, "FFCal", 1, 0, 0, 1, 1, 1, 1);

    if (MinUntilHighNews <= MinsUntilNextHighNews || MinSinceHighNews <= MinsSincePrevHighNews) {

    NewsF = "Avoiding High Impact News...";

    g_minute_296 = Minute();

    return(0);

    }

    }

    if (Medium_Impact) {

    int MinSinceMediumNews=iCustom(NULL, 0, "FFCal", 0, 1, 0, 1, 1, 1, 0);

    int MinUntilMediumNews=iCustom(NULL, 0, "FFCal", 0, 1, 0, 1, 1, 1, 1);

    if (MinUntilMediumNews <= MinsUntilNextMediumNews || MinSinceMediumNews <= MinsSincePrevMediumNews) {

    NewsF = "Avoiding Medium Impact News...";

    g_minute_296 = Minute();

    return(0);

    }

    }

    if (Low_Impact) {

    int MinSinceLowNews=iCustom(NULL, 0, "FFCal", 0, 0, 1, 1, 1, 1, 0);

    int MinUntilLowNews=iCustom(NULL, 0, "FFCal", 0, 0, 1, 1, 1, 1, 1);

    if (MinUntilLowNews <= MinsUntilNextLowNews || MinSinceLowNews <= MinsSincePrevLowNews) {

    NewsF = "Avoiding Low Impact News...";

    g_minute_296 = Minute();

    return(0);

    }

    }

    NewsF = "No news Impact...";

    return(1);

    }

    if(!AvoidNews) {

    NewsF = "News Filter off!";

    return(1);

    }

    }

    //*************************************************************************

     

    sorry for the bad english....

  3. can anyone guide me this code within eakain edu?

     

    within "VIOD S0()" there is a portion that stated:-

    if (!isOrderBuy(MagicNumberS0) && AproBuyS0(gd_396, gd_404, gi_280, bid, DoubleToStr(0, 0)) == 1) ApriS0(1);

    if (!isOrderSell(MagicNumberS0) && AproSellS0(gd_396, gd_404, gi_280, bid, DoubleToStr(0, 0)) == 1) ApriS0(2);

     

    there are using bid's for both long and short.... it is suppose to be "bid" & "ask" for buying and selling?

  4. Hi I've been using quantum pip on eurchf and it's have been quite profitable for last few weeks. but the only problem is it active trading for too long (4 hours). Most of time, i have to manually close trade when its loosing profits.

     

    as i look in to the codes at "int IsTradeTime()"; it's very difficult to understand where to narrow the trading period.

    can anyone provide guidance on the modification?

     

    apologize for my bad English..

  5. I've run the EA in my DEMO account (from 8th April 2010 till today) and notice it enter trade every possibility within 24h. and it's not really recommended in EURUSD where the trade were unpredictable.

    from what i verify by the given "set" file, the effective winning trade only happen between hour 1 till hour 4.

     

    can anyone help to add coding on start trading hour and end trading hour?

     

    thanks.

  6. Hi Doncol.

    personally i thing this is a very good EA where it seem to open huge amount of buy sell limit and getting the right time to enter a trade in USDJPY. but i don't understand that why this EA take risk on each section (europe, US, asia).

    anyway, i'm new in forex, perhaps i haven't gone up to level yet. maaf

×
×
  • Create New...