Jump to content

muruku

Members
  • Posts

    183
  • Joined

  • Last visited

Posts posted by muruku

  1. can you manually enter your trade with 0.02 lots .. try it before you figure out why this EA reject the neworder() ?

     

    Hi Guys,

     

    Agree with metin - Could you correct the code to micro lots? I'm trying to trade 0.02 lots in my little live acc, and I have the following issues:

     

    ...

    2010.09.17 01:01:47 CableRunII GBPUSD,H1: #0 Error: 4105 Function: NewOrder(3,0.02,1.5604,0,0) 10

    2010.09.17 01:01:47 CableRunII GBPUSD,H1: #0 Error: 4105 Function: NewOrder(3,0.02,1.5604,0,0) 9

    2010.09.17 01:01:47 CableRunII GBPUSD,H1: #0 Error: 4105 Function: NewOrder(3,0.02,1.5604,0,0) 8

    2010.09.17 01:01:47 CableRunII-GBPUSD,H1: #0 Error: 4105 Function: NewOrder(3,0.02,1.5604,0,0) 7

    2010.09.17 01:01:47 CableRunII-GBPUSD,H1: #0 Error: 4105 Function: NewOrder(3,0.02,1.5604,0,0) 6

    2010.09.17 01:01:47 CableRunII-GBPUSD,H1: #0 Error: 4105 Function: NewOrder(3,0.02,1.5604,0,0) 5

    2010.09.17 01:01:47 CableRunII-GBPUSD,H1: #0 Error: 4105 Function: NewOrder(3,0.02,1.5604,0,0) 4

    2010.09.17 01:01:47 CableRunII-GBPUSD,H1: #0 Error: 4105 Function: NewOrder(3,0.02,1.5604,0,0) 3

    2010.09.17 01:01:46 CableRunII-GBPUSD,H1: #0 Error: 4105 Function: NewOrder(3,0.02,1.5604,0,0) 2

    2010.09.17 01:01:46 CableRunII-GBPUSD,H1: #0 Error: 4105 Function: NewOrder(3,0.02,1.5604,0,0) 1

    2010.09.17 01:01:46 CableRunII-GBPUSD,H1: #0 Error: 4105 Function: NewOrder(3,0.02,1.5604,0,0) 0

     

    Thanks a lot to muruku, for his excellent work !

     

    P.S.: I would suggest to murukutu to create a 4shared/mediafire repository with all the proposed mods (already modified), and that should clear some kind of confusion related to the great ideas he has, and that we're not sure if some of them - or all, were introduced in his latest versions. It's just an idea...

     

    Regards,

     

    4XL

  2. I personally only use 2 versions of Cab*eR*n EA:

    1. See post #4 or #9 <- Original EA

    2. See my post #102 <- EA modified by Muruku.

    Both are giving me very good results. But I must say the modified version giving me better results in my demo.

    And please Guys, don't be lazy to read all posts in this thread if U want to know more about this EA, especially all posts from Muruku. Believe me, it's really WORTH it.. Although Muruku has been posting alot of his/her ideas with coding, he/she also gave some recommendation settings that are so easy to follow.. I'm a newbie about coding, I can only follow his easiest recommendation setting for now, which is the setting for ATR. But it's already giving me awesome results.. Just try to forward test the EA with Muruku's recommended setting.. U'll easily find them if U really read all his/her posts.. This thread is only 12 pages anyway..

    And it might even better if U know about coding & try to put some Muruku's ideas (it's already in coding form) into your EA. I bet U'll be surprised to see how good this modified EA can be. :)

     

    Clevereto, be venture enuff & dump this EA to LIVE acc, I 'm happy to assist your guys become millionaire..

  3. 420 pips for these 4 days in LIVE acc..

     

    Be mindful, just found out the broker started to delete this EA buy/sell limit, why i knew ?

    1) as i never see any record in journal as below when hanky panky stuff happened ..

    2) as the EA still attempt to open its pending trades, i manually enter the pending orders..mine not deleted !!!

    3) When i deleted my manual orders, record found in my mt4 platform.

    4) When i change the magic #, the EA 's pending trades workable again...

    2010.09.16 23:06:50 'XXXX': delete pending order #4363984 sell limit 0.10 GBPUSD. at 1.5662 sl: 0.0000 tp: 0.0000

    ..

    Look's like their side had some watchers/ i believe some plug-in client tool to monitor each of good trades..

    from many threads i read in this forum, the broker kind of recognize the "signature" either Ordersend() by EA or manual trade

    hmm what a dirty tricks of these broker nowadays ..

     

    Clevereto, you won't need to change ATR_Period in ATR_Pips..i stay as 7 (sorry, i keep on finetunning)..

    //---input variables

    extern int ATR_Period=7; //good for 7 16-Sep.. dun touch

     

    How to handle nasty broker ?

    -- write the virtualkeystroke logic to emulate manual trade to confuse them ?

    -- diligently change the magic # everyday ?

    i made it workable before, but not usable in VPS or when your pc in locked / screen saver mode ..

    anybody had breakthru for this ?

     

    void MyOrder(int tradecmd, double tradelots,double top_price, double tp_price, double sl_price) {

     

    switch (tradecmd) {

     

    case 0: /*Buy*/

    //Like: [F9][TAB][0][.][2][5][TAB][1][.][4][9][5][3][TAB][1][.][5][0][5][0][TAB][TAB][TAB][TAB][sPACE][ALT+F4]

    SendKey(VK_F9);

    SendKey(VK_TAB);

    SendKey(tradelots_0);

    SendKey(tradelots_1);

    SendKey(tradelots_2);

    SendKey(tradelots_3);

    SendKey(tradelots_4);

     

    SendKey(VK_TAB);

    SendKey(sl_price_0);

    SendKey(sl_price_1);

    SendKey(sl_price_2);

    SendKey(sl_price_3);

    SendKey(sl_price_4);

    SendKey(sl_price_5);

     

    SendKey(VK_TAB);

    SendKey(tp_price_0);

    SendKey(tp_price_1);

    SendKey(tp_price_2);

    SendKey(tp_price_3);

    SendKey(tp_price_4);

    SendKey(tp_price_5);

     

    SendKey(VK_TAB);

    SendKey(VK_TAB);

    SendKey(VK_TAB);

    SendKey(VK_TAB);

    SendKey(VK_SPACE);

    //Sleep(7000);

    //SendAltKey(VK_SPACE);

    //SendKey(VK_DOWN);

    //SendKey(VK_DOWN);

    //SendKey(VK_DOWN);

    //SendKey(VK_RETURN);

    //SendKey(VK_RETURN);

    //SendCtrKey(VK_F9);

    //SendKey(VK_ESCAPE);//SendAltKey(VK_F4);

    break;

     

    case 1: /*Sell*/

    SendKey(VK_F9);

    SendKey(VK_TAB);

    SendKey(tradelots_0);

    SendKey(tradelots_1);

    SendKey(tradelots_2);

    SendKey(tradelots_3);

    ...

    ...

    SendCtrKey(VK_F9);

    //SendKey(VK_ESCAPE);//SendAltKey(VK_F4);

    break;

     

    default:

    //return (-1);

    break;

    }

    }

  4. NY Session 8am - 1pm is uncertainty period as usual, a lot of econ news queuing to be announced out.. That's not a good idea for all sort of scalper EAs to be active at this time period.

     

    string CableRunNOTtoTradesTime1 = "20:00"; <-- this is your pc local time (=NY 8am)

    string CableRunNOTtoTradesTime2 = "01:30"; (=NY 1.30pm)

     

    ..

    ..

     

    Comment("\n\n\n+++++++ CableRun OFF ++++++++"

    +"\n"

    ..

    ..

    if ( !TelagaEmas && TimeCurrent() < StrToTime(CableRunStartTime + ":00")) return (0);

    if (IsTradeTime(CableRunNOTtoTradesTime1, CableRunNOTtoTradesTime2)) return (0);

     

    ..

    ..

    ..

     

     

    bool IsTradeTime(string as_0, string as_8) {

    string l_time2str_16 = TimeToStr(TimeLocal(), TIME_MINUTES);

    if (as_0 < as_8 && l_time2str_16 < as_0 || l_time2str_16 >= as_8) return (false);

    if (as_0 > as_8 && (l_time2str_16 < as_0 && l_time2str_16 >= as_8)) return (false);

    if (as_0 == as_8) return (false);

    return (true);

    }

  5. I'm happy to know & to help some folks like cleveroto as he/she starts to see $ roll in..

    hey folks, one of the reason i hesitate to share my latest code as i noticed that C**b**Run had discontinued sharing their result in FPA.. that sounded impossible to me as no more trading activities...

    Almost all of our folks here should have sort of base or should i say most decent code of this EA, so i'm sorry not replying all requests to upload the latest code...

     

    i have some newer thoughts today..

    ===========================

    1- Resume to use the logic of TotalProfit(Magic), so that we can deploy many C**b**Run EAs as we want (with each of them having unique magic# ) .. The logic is meant to return total pips earned from each EA per their magic ID. to maximize the profit. How many of them ? do it according to your MM.

    double Pips = TotalProfit(Magic);

    if (Pips > MinProfit){

    DeletePendingOrders(Magic);

    CloseAllTrades(0, Magic)

    }

    2- Having 2 layers of ATR Ranging filtering zones (A & B) as listed. As after sharp trending due to news elapsed, the ranging may resume back in higher range of ATR ..however, it will take some time to settle to Zone A .., so Zone B should be considered a good trade entry too..

     

    Low ranging zone A

    =============

    double ATRUpLimit1 = 13.0;

    double ATRDnLimit1 = 7.0;

     

    Higher ranging zone B

    ===============

    double ATRUpLimit2 = 26.0;

    double ATRDnLimit2 = 19.0;

    ..

    ..

     

    double ATRPips =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,0);

    double ATRPrePips1 =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,3);

    double ATRPrePips2 =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,6);

    ..

    ..

     

    if (

    (ATRPrePips1 >= ATRDnLimit1 && ATRPrePips1 <= ATRUpLimit1

    && ATRPrePips2 >= ATRDnLimit1 && ATRPrePips2 <= ATRUpLimit1

    && ATRPips >= ATRDnLimit1 && ATRPips <= ATRUpLimit1)

    || (ATRPrePips1 >= ATRDnLimit2 && ATRPrePips1 <= ATRUpLimit2

    && ATRPrePips2 >= ATRDnLimit2 && ATRPrePips2 <= ATRUpLimit2

    && ATRPips >= ATRDnLimit2 && ATRPips <= ATRUpLimit2)) MySignal =1;

     

    3- Considering write your logic for SL too, do you feel scary with EA without SL...??

    By seeing the trade records in FPA, let's set 190-200 pips ..

  6. clevereto really clever,

     

    My previous thought was using Bollinger bandwidth (gap of upper/lower band) to decide if market is ranging or trending, but we soon realize especially during NY session, the bandwidth can be widen up to 100 pips but the market resume ranging after all sorts of econ news elapsed after 8-10.30am NY time. So ATR indicators can be applicable to detect consolidation market... also if the ranging had all small small candlestick side by side or doji, they are also unfavorable, so, we should filter them off..

    i suggest below methods..

     

    double ATRPips =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,0);

    double ATRPrePips1 =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,6);

    double ATRPrePips2 =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,9);

     

    int MySignal = 0;

     

     

    //Print("ATRPrePips",ATRPrePips);

     

    if (ATRPrePips1 >= ATRDnLimit && ATRPrePips1 <= ATRUpLimit+1

    && ATRPrePips2 >= ATRDnLimit && ATRPrePips2 <= ATRUpLimit+1

    && ATRPips >= ATRDnLimit && ATRPips <= ATRUpLimit) MySignal =1;

     

    ** to be venture enough to trade more lot size, i suggest some time check ..

    if (TimeCurrent() <= StrToTime(CableRunEndTime + ":00")) FirstLot = 0.11; <--during Asian Session

    if (TimeCurrent() >= StrToTime(CableRunEndTime + ":00")) FirstLot = 0.10; <--during Euro Session

    if (TimeCurrent() >= StrToTime(CableRunNightTime+ ":00")) FirstLot = 0.11; <-- after NY news elapsed.

     

     

    if (MySignal ==1 & ...) { start to turn on the EA }

     

    Sorry guys for evolving so many ideas here too rapid... for those can not cope, my apology here.

     

    ** This morning i turned on double C****Run with my proposal idea of using

    int TotalProfit(int ai_magic) instead of GlobalVariableSet("OldBalance", AccountBalance());..

    things not working well, only earned 20 pips instead of at least 30 pips for dual EAs.

    Maybe price flipped too fast that EA not catch it correctly using this new sub., so, better revert to old way of $ rolling. :)

  7. i shouldn't invest time in mq4 code as i 'm just parttimer like others working man .. lol, i dun know .. missing logic just attach..

     

    int MySleep(int ai_0) {

    int l_datetime_4;

    bool li_8 = FALSE;

    int l_datetime_12 = TimeLocal();

    while (!li_8) {

    l_datetime_4 = TimeLocal();

    if (l_datetime_4 >= l_datetime_12 + ai_0) li_8 = TRUE;

    else Sleep(500);

    }

    return (0);

    }

  8. Muruku:

    Ohh.. Is it because I set parameter "TelagaEmas" to true? Should I set it to false if I want to trade in a specific time?

     

    why your open orders need to close manually ? below codes are excellent/brutal force way to make sure all open orders are swept cleanly after profit had made.

     

    int CloseAllTrades(int ai_0, int ai_magic) {

    int l_count_8;

    int l_error_12;

    int li_16 = 4;

    int li_20 = 5;

    int l_ord_total_23 = OrdersTotal();

    for (int l_pos_36 = l_ord_total_23 - 1; l_pos_36 >= 0; l_pos_36--) {

    if (OrderSelect(l_pos_36, SELECT_BY_POS, MODE_TRADES)) {

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

    l_count_8 = 0;

    while (l_count_8 < li_16) {

    switch (OrderType()) {

    case OP_BUY:

    if (ai_0 == 0 || ai_0 == 2) {

    RefreshRates();

    OrderClose(OrderTicket(), OrderLots(), Bid, 0, CLR_NONE /*White*/);

    }

    break;

    case OP_SELL:

    if (ai_0 == 0 || ai_0 == 1) {

    RefreshRates();

    OrderClose(OrderTicket(), OrderLots(), Ask, 0, CLR_NONE/*White*/);

    }

    break;

    case OP_BUYLIMIT:

    case OP_BUYSTOP:

    if (ai_0 == 0 || ai_0 == 2) OrderDelete(OrderTicket());

    break;

    case OP_SELLLIMIT:

    case OP_SELLSTOP:

    if (ai_0 == 0 || ai_0 == 1) OrderDelete(OrderTicket());

    }

    l_error_12 = GetLastError();

    if (l_error_12 == 0/* NO_ERROR */) l_count_8 = li_16;

    else {

    l_count_8++;

    if (l_error_12 == 138/* REQUOTE */ || l_error_12 == 129/* INVALID_PRICE */) continue;

    if (l_error_12 == 146/* TRADE_CONTEXT_BUSY */) {

    MySleep(li_20);

    li_16 = 10;

    }

    }

    }

    }

    } else {

    //Print("CloseAllTrades Error when order select ", GetLastError());

    SendMail("LombongBerlian ada Error tutup "+ Period(), WindowExpertName()+" "+GetLastError());

    break;

    }

    }

    return (0);

    }

  9. Celvereto, you r right, when "telagaEmas" is true, the EA works 24 hrs. (tried to hide as many parameters as we can, although they are far more aware if we r running manual/EA)..

    The new logic below will let you run 2 set of C*b**Run in same MT platform, discard the usage of GlobalVariableSet that only limit the play of the only 1 C*b**Run .

    just clone out another set of EA & having them to run with diff magic #... & you will have more pips !

    Would like to precaution any fancies abt C*b**Run, better write a logic on SL too.

     

    if (TotalProfit(Magic) > MinProfit){

    CloseAllTrades(1, Magic);

    CloseAllTrades(2, Magic);

    //GlobalVariableSet("OldBalance", 0);

    }

     

    int TotalProfit(int ai_magic)

    {

    int total=OrdersTotal();

    int totalPips = 0;

    for (int cnt=0;cnt<total;cnt++)

    {

    OrderSelect(cnt, SELECT_BY_POS);

    int mode=OrderType();

    bool condition = false;

    if (OrderMagicNumber()== ai_magic)condition = true;

    if (condition)

    {

    switch (mode)

    {

    case OP_BUY:

    totalPips += MathRound((MarketInfo(OrderSymbol(),MODE_BID)-OrderOpenPrice())/MarketInfo(OrderSymbol(),MODE_POINT));

    break;

     

    case OP_SELL:

    totalPips += MathRound((OrderOpenPrice()-MarketInfo(OrderSymbol(),MODE_ASK))/MarketInfo(OrderSymbol(),MODE_POINT));

    break;

    }

    }

    }

    return(totalPips);

    }

  10. i suggest all of us to study ATR_Pips.mq4 based on which optimized setting should be to decide when the market is abt to RANGING/Consolidation period to let this EA to enter/initialize the first trade.

    Hardcode of Trading time control may gain lesser profit...

    //---input variables

    extern int ATR_Period=5;

    What do you think ? currently i set to 5 for above, & for EA, i set to be <= 9 to open the trades. You should ez spot whenever the incoming news, ATR_Pips.mq4 should be smart enough to filter / prevent EA to turn on the trade...

    I may not be right/wrong, your folks be self-studied & responsible of your own trades..

    dun simply hop onto the bandwagons :)

  11. as far as i know, when an EA had external indicators attached as our case below(icustom).. the EA would never backtestable... so please dun waste your time... go to do something useful..

     

    double ATRPips =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,0);

    i glanced thru above threads, guess somebody still not well verse how to do things correctly..

    below external variable is set in ATR_Pips.mq4 itself.

     

    //---input variables

    extern int ATR_Period=13;

     

    & in the EA,

    double ATRLimit = 12.0; // good at 12 at 11-sep!!

    ..

    ..

    ..

    double ATRPips =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,0);

    ...

    ..

     

    if( ATRPips <= ATRLimit && MyOrdersTotal(Magic) == 0) {

    ..

  12. Dun selfish your KUDOs okay ?

    this is a splendid EA i even seen.. dun change any vital parameters like step, firstlot, minprofit !!!

    i would suggest you cease all your EA so as not to disrupt the logic of it since when you get at least 15 pips profit out of the equity via this EA, but others EA still in minus pips.. all open positions by this EA could never close & making things complicated. ATR_pips is a good filter (let's set it to extern int ATR_Period=10 in ATR_Pips.mq4) to ensure the EA entering trade during quiet/RANGING market..

    If i would have not let my other self-developed EA run, i should at least earned 500 pips..

    so, i got 217 pips this week (unlucky)..

    It's okay .. let the CABLE RUN.. it's actually a cash machine !!!

     

    ** Anyone have the latest version CableRun from Pr*fit*bl* FX DO SHARE !!!!

  13. ok folks..dun use Bollinger band width to enter the trade as i said before > 20 & < 70 which will reduce a lot of profit opportunities, as during NY session, the bandwidth will easily as wide as 100..

    Let's add below ..

    double ATRPips =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,0);

    if( ATRPips <=13 && MyOrdersTotal(Magic) == 0) {

    OrderSend(Symbol(), OP_BUYLIMIT, FirstLot, Ask - Step * Point, 3, 0, 0, "", Magic, 0, CLR_NONE /*Green*/);

    OrderSend(Symbol(), OP_SELLLIMIT, FirstLot, Bid + Step * Point, 3, 0, 0, "", Magic, 0, CLR_NONE /*Red*/);

    }

    u can download ATR_Pips.mq4 from

  14. Believe me or not Cable Run can give you in average of 500-600 pips per week... i have personally follow up its logic & i supposed to gain 15 pips x 8 = 120 pips within 2 days !!!! (but other self-developed EAs skru up the gain..)

    Make sure you

    -add a patch onto this EA to enter trade ONLY during moderate bandwidth .. Bollinger band > 20 & < 70, where the market is ranging & time on/off can be added to this EA activity

    -set NO TP/SL <-- this is very important as losing positions will be contra by winning position, if any TP/SL reach, you will have hard time to reach at least 15 pips profit in overall.

    -The existing logic to close all active positions when at least 15/16 pips are gain is not fully workable. I encountered partially of pos was closed. Make sure to add looping to forcing cleanclose happily.

    -avoid running of this EA during US session / get rid of any econ news during this session ..

     

    Dun waste time looking for others HollyGrail, i have really love this beast ! You will see $$ roll in ...

  15. earned 40 pips today in life acc.

    dun waste time in backtest that i used to do before.

     

    // according to the spec, suggested Active 5am until 4pm at GMT +8

    so, i just adjust based on personal preference

    string CableRunStartTime = "1:00"; // 1:00=6am

    string CableRunEndTime = "9:20"; // 9:20=2.20pm

    your guys should figure out what your broker GMT is & adjust the trading time. See the timeconversion website as ref.

  16. Dear traders,

    here's new revolution of CableRun II includes all the fantastic features, that i port over them from my other matured EA.. All of them are almost self explainable..

    -Super advanced & dynamic features :- hidden TP/SL,BE,BE2, Scaling out

    -Trailing step

    -Active/End Session trading time (my time is GMT+8) you have to adjust yours

    -Delete all pending Buy/Sell Limit after Session End.

    -*** I hv able to program KeyStroke to mimic Manual trading, but no point if you use VPS/turn on screen saver, thus not adding here.

    http://www.mediafire.com/?fa3j0b9ce9nl584
×
×
  • Create New...