Jump to content

muruku

Members
  • Posts

    183
  • Joined

  • Last visited

Posts posted by muruku

  1. folks,

    Here's my opinion..

    Usually no matter how good the filters (MA, time enter/exit) were designed to ensure the EA sneak to the market in quiet period, still we never know how trending the markets ahead, but usually Asian market tends to be quiet & when comes to Euro market, it tends to swing, more trending will be NY session..

    If this EA is designed for Asian scalper only, I doubt the profit will be as little as like 200-300 pips per week ? that wasn't impressive (as the motherhood EA CableRun actually targeted > 400 pips per week that I think the traders also need to control on/off as well, when the trade unintended intercept with unscheduled/scheduled eco news )..

    If your guys dare to let IndoRun run 24hrs, some smart anti Dry Boil mechanism need to be in place... I believe everybody can give the brilliant idea on entering trade, exit strategies is more headache to deal with ...

  2. Firozfx, can you share your idea which other currency pairs also profitable with low drawdown ?

    used to ranging market more often ?

     

     

     

    Isn;t it obvious that the above account will get blown up. Small deposit from the beginning. Any ea needs equity to handle drawdowns.

     

    Here is my $100K demo account. To me this will work on a $1000 live account with 0.01 lots. No need to be greedy.

     

    http://www.myfxbook.com/members/firozlim/avacablerun/62053 - 1510 pips on 3 charts in 4 days

     

    I am running Cablerun v3 on Eurusd and Gbpusd on 1hr Tf to test compatability.

     

    Cablelankan_muruku_teknomage on USDCHF on 1hr Tf.

     

    Currently about 110 pips in negative on open trades but can close this and still make 1400 pips in the week

     

    Summary

     

    304 pips on Usdchf

    844 pips on Gbpusd

    362 pips on Eurusd.

     

    I will run it for a few more weeks before I turn it onto live account with the best performer.

     

    The most drawdown I saw was around 1000 pips in total. About 100 dollars. Nothing to worry about even on a $1000 account. Of course the live will only have 1 chart initially.

     

    Watch this space

  3. Expat & any expert,

    have we able to make below code that run in M15 but the EA to be in H1 ?

     

     

     

    Welcome back ;)

     

    I have managed to integrate the ATR Indicator in the EA as per below. Testing runs a bit quicker that way.

    If you want to integrate it, the EA must run on a 15min timeframe/chart.

     

    Cheers

     

     

    double ATRPips = ATR(ATR_Period1, ATRShift1);

    double ATRPrePips1 = ATR(ATR_Period2, ATRShift2);

    double ATRPrePips2 = ATR(ATR_Period3, ATRShift3);

     

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

    double ATR(double ATR_Period, int Shift)

    {

    double ATRPips[];

    string symbol = Symbol();

    int timeframe = 15;

     

    int IBARS = iBars(symbol, timeframe);

     

    if(IBARS < ATR_Period)

    return(0);

     

    if(ArraySize(ATRPips) < Bars)

    {

    ArraySetAsSeries(ATRPips, false);

     

    //----

    ArrayResize(ATRPips, Bars);

     

    //----

    ArraySetAsSeries(ATRPips, true);

     

    }

     

    static int IndCounted;

    IndCounted = Bars - 1;

    int counted_bars=IndCounted;

     

    if(Bars<=ATR_Period) return(0);

     

    if(counted_bars<1)

    {

    for(int i=1;i<=ATR_Period;i++) ATRPips[bars-i]=0;

    }

     

    i=Bars-10-1;

     

    if(counted_bars>=10) i=Bars-counted_bars-1;

     

    double _my_point=Point;

    if (_my_point==0.00001) _my_point=0.0001;

    if (_my_point==0.001) _my_point=0.01;

     

    i=Bars-counted_bars-1;

     

    while(i>=0)

    {

    double ATRVal=iATR(Symbol(),0,ATR_Period,i);

    ATRPips=MathRound(ATRVal/_my_point);

    i--;

    }

     

    return(ATRPips[shift]);

    }

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

  4. Look's like you have too much struggling & you keep engaging the team here to refine the codes ?

    You may not aware of those trades rejection solely seen in your broker yet you claimed they r good ?

     

     

    Default ATR 7. The ATR pre-periods on the later tekno versions I've tried from 16 - 14. Is there a better combo? I've also had TP issues with the later tekno versions.

    Guys if you're using 5 digit brokers you should use teknomage versions and Indo Run versions. Throw the rest away (Cable Muruku 4, Cable Larikan Ok 24 HR) as they will give you errors (error 130 usually). If you're on a 4 digit broker you're probably ok. I've tried Cable Larikan ok 24HR on a 5 digit broker with real money. Results not good.

  5. I think all type of Day/Night scalper need this ATR filters.

     

     

     

    I'm delighted with CR performance that I had deployed since 06-Sep until today, 1950 pips..

    Which meant daily average 80-100 pips ..thus, I still want to write rubbish here & there to hopefully give some indications ..

     

    so, here's my ATR setting now.

     

    double ATRPeriod1 = 3.0;

    double ATRPeriod2 = 4.0; // safer at 5, again, up to you...

     

    double ATRUpLimit1 = 13.0; // good at 13 at 11-sep!! zone A

    double ATRDnLimit1 = 6.0; // good at 7 at 11-sep!!

     

    double ATRUpLimit2 = 21.0; // good at 21 at 11-sep!! zone B

    double ATRDnLimit2 = 16.0; // good at 16 at 11-sep!!

     

    double ATRUpLimit3 = 28.0; // good at 28 at 11-sep!! zone C

    double ATRDnLimit3 = 25.0; // good at 25 at 11-sep!!

     

    ...

    ...

    ...

     

     

    if (ATRPrePips1 >= ATRDnLimit1 && ATRPrePips1 <= ATRUpLimit1

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

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

    /*|| HowTight >= HowTightDnLimit && HowTight <= HowTightUpLimit*/) MySignal =1; // all in zone A

     

     

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

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

    && ATRPips >= ATRDnLimit2 && ATRPips <= ATRUpLimit2

    /*|| HowTight >= HowTightDnLimit && HowTight <= HowTightUpLimit*/) MySignal =1; // all in zone B

     

     

    if (ATRPrePips1 >= ATRDnLimit3 && ATRPrePips1 <= ATRUpLimit3

    && ATRPrePips2 >= ATRDnLimit3 && ATRPrePips2 <= ATRUpLimit3

    && ATRPips >= ATRDnLimit3 && ATRPips <= ATRUpLimit3

    /*|| HowTight >= HowTightDnLimit && HowTight <= HowTightUpLimit*/) MySignal =1;

    // all in zone C (quite active, some news going on, that's why zone C range limit is pretty tide.

     

     

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

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

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

    /*|| HowTight >= HowTightDnLimit && HowTight <= HowTightUpLimit*/) MySignal =1;

    // hybrid zones, price actions go back to Zone A

     

     

    if (ATRPrePips1 >= ATRDnLimit1 && ATRPrePips1 <= ATRUpLimit1

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

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

    /*|| HowTight >= HowTightDnLimit && HowTight <= HowTightUpLimit*/) MySignal =1;

    //hybrid zones, price actionss back to quiet, zone A

  6. I had been listening too many times complains of CR not closing all trades in a bucket ... still not seeing effort by whom in debugging why so.

    With that, let me feed the fishes to unskillful fishers.

    Below codes had been revamped with my invention of dynamic magic range.

    teknomage will know how to help your guys..

     

     

    double Pips = TotalProfit();

    if (Pips >= MinProfit){

     

    while(MyOrdersTotal() != 0) {

    CloseAllTrades(1);

    CloseAllTrades(2);

    }

    DeletePendingOrders();

     

    }

     

    ...

    ...

     

    int MyOrdersTotal() {

    int l_count_4;

    int l_ord_total_8;

    l_count_4 = 0;

    l_ord_total_8 = OrdersTotal();

    for (int l_pos_12 = 0; l_pos_12 < l_ord_total_8; l_pos_12++) {

    OrderSelect(l_pos_12, SELECT_BY_POS, MODE_TRADES);

    if (OrderSymbol()==Symbol() && OrderMagicNumber()>= MagicRangeLow && OrderMagicNumber()<= MagicRangeHigh && OrderComment() == g_comment_152 && OrderSymbol() == Symbol()) l_count_4++;

    }

    return (l_count_4);

    }

     

     

    double TotalProfit()

    {

    int total=OrdersTotal();

    double totalPips = 0.0;

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

    {

    OrderSelect(cnt, SELECT_BY_POS);

    int mode=OrderType();

    bool condition = false;

    if (OrderSymbol()==Symbol() && OrderMagicNumber()>= MagicRangeLow && OrderMagicNumber()<= MagicRangeHigh && OrderComment() == g_comment_152 )condition = true;

    if (condition)

    {

    switch (mode)

    {

    case OP_BUY:

    RefreshRates();

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

    break;

     

    case OP_SELL:

    RefreshRates();

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

    break;

    }

    }

    }

    return(totalPips);

    }

     

    int DeletePendingOrders() {

    int l_ord_total_4;

    l_ord_total_4 = OrdersTotal();

    for (int l_pos_8 = l_ord_total_4 - 1; l_pos_8 >= 0; l_pos_8--) {

    while (!IsTradeAllowed()) Sleep(700);

    OrderSelect(l_pos_8, SELECT_BY_POS, MODE_TRADES);

    if (OrderSymbol()==Symbol() && OrderMagicNumber()>= MagicRangeLow && OrderMagicNumber()<= MagicRangeHigh && OrderComment() == g_comment_152 && OrderSymbol() == Symbol() && OrderType() == OP_BUYLIMIT || OrderType() == OP_SELLLIMIT) OrderDelete(OrderTicket());

    }

    return (0);

    }

     

    int CloseAllTrades(int ai_0) {

    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()>= MagicRangeLow && OrderMagicNumber()<= MagicRangeHigh && OrderComment() == g_comment_152) {

    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);

    }

    break;

     

    case OP_SELL:

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

    RefreshRates();

    OrderClose(OrderTicket(), OrderLots(), Ask, 0, CLR_NONE);

    }

    break;

     

    case OP_BUYLIMIT:

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

    break;

     

    case OP_SELLLIMIT:

    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 {

    SendMail("CR have Error closing "+ Period(), WindowExpertName()+" "+GetLastError());

    break;

    }

    }

    return (0);

    }

     

    I don't know muruku I ran CableLarikan ATR mod (these exact settings except for double ATRDnLimit1 = 6.0; // your prevous post #335 was on 7.0). I ran these settings (post #355)and it resulted in massive DD (wet your pants type draw down). Draw down in sell trades while Standard CableLarikan ok 24h busting through the roof with buy trades.

     

    Only problem is (still not rectified even after all this time) is that CableLarikan still doesn't close trades properly when in profit. I tried the WHILE loop (from a previous post) from muruku but it had trades in the wrong direction last night while the Standard Cable Larikan was in the right direction. I can't ignore physical evidence.

     

    Demo started 8 trading days ago with Standard CableLarikan ok 24h available from post #322 at $3000. ATR 5. It is now Wednesday the following week. The demo is now up to $11346 equity $11345. All on 0.1 lots no increasing lots.

    Note: I had to close trades manually for the first time last night because trades even from late last week were not being closed and were banking up.

     

    It really could do with an "Close all trades now" parameter.

     

    P.S Some amazing developments here and a big thanks to everyone.

  7. This is pcs of junk statement, luckily was demo. CR shouldn't behave that way..

     

    That's great idea! The truth is is that it's not a perfect world and all traders monitor their trades whether they are using manual means or an expert advisor. Here is my demo statement for that demo I started 8 trading days ago just in case there are some non-believers out there...

    http://www.4shared.com/file/n-OVp9po/CableLarikan_Statement.html

  8. Here's my LIVE statement for the past month. Not intend to publish myfxbook live result so as not be jeopardized by unexpected vicious.

     

     

    That's great, Muruku. Can you please put up a real-time link or statement (like MT4Live.com or MyFxBook) showcasing your results, so that we can compare it with our own? It'd be really helpful if you could do so. Thanks!
  9. I'm delighted with CR performance that I had deployed since 06-Sep until today, 1950 pips..

    Which meant daily average 80-100 pips ..thus, I still want to write rubbish here & there to hopefully give some indications ..

     

    so, here's my ATR setting now.

     

    double ATRPeriod1 = 3.0;

    double ATRPeriod2 = 4.0; // safer at 5, again, up to you...

     

    double ATRUpLimit1 = 13.0; // good at 13 at 11-sep!! zone A

    double ATRDnLimit1 = 6.0; // good at 7 at 11-sep!!

     

    double ATRUpLimit2 = 21.0; // good at 21 at 11-sep!! zone B

    double ATRDnLimit2 = 16.0; // good at 16 at 11-sep!!

     

    double ATRUpLimit3 = 28.0; // good at 28 at 11-sep!! zone C

    double ATRDnLimit3 = 25.0; // good at 25 at 11-sep!!

     

    ...

    ...

    ...

     

     

    if (ATRPrePips1 >= ATRDnLimit1 && ATRPrePips1 <= ATRUpLimit1

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

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

    /*|| HowTight >= HowTightDnLimit && HowTight <= HowTightUpLimit*/) MySignal =1; // all in zone A

     

     

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

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

    && ATRPips >= ATRDnLimit2 && ATRPips <= ATRUpLimit2

    /*|| HowTight >= HowTightDnLimit && HowTight <= HowTightUpLimit*/) MySignal =1; // all in zone B

     

     

    if (ATRPrePips1 >= ATRDnLimit3 && ATRPrePips1 <= ATRUpLimit3

    && ATRPrePips2 >= ATRDnLimit3 && ATRPrePips2 <= ATRUpLimit3

    && ATRPips >= ATRDnLimit3 && ATRPips <= ATRUpLimit3

    /*|| HowTight >= HowTightDnLimit && HowTight <= HowTightUpLimit*/) MySignal =1;

    // all in zone C (quite active, some news going on, that's why zone C range limit is pretty tide.

     

     

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

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

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

    /*|| HowTight >= HowTightDnLimit && HowTight <= HowTightUpLimit*/) MySignal =1;

    // hybrid zones, price actions go back to Zone A

     

     

    if (ATRPrePips1 >= ATRDnLimit1 && ATRPrePips1 <= ATRUpLimit1

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

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

    /*|| HowTight >= HowTightDnLimit && HowTight <= HowTightUpLimit*/) MySignal =1;

    //hybrid zones, price actionss back to quiet, zone A

     

     

     

     

     

     

    E.g. for the"when/what" of this bigger drawdowns. I have had a brief look into the details of the backtest which I posted prior. The big drawdowns appear mainly due to and before the release of the FOMC Statement or Meeting Minutes. Thus, the FOMC is getting this Strategy into trouble as for most EAs... E.g. I do switch off my EAs or most of it off for 3 days when the FOMC Statement is due (1 day before, due and 1 day after...)

     

    FOMC Meeting Minutes in September 2010 GBPSD, thats an utterly bad drawdown if catched...

     

    http://img571.imageshack.us/img571/5791/fomc1.jpg

     

     

    Cheers

  10. Since last week, my FF browser kept crashing like nobody bz .. still not solving, .. anyway, back to our topic of CR..

    We discussed abt good features & strategies need in CR that I keep in short as for now..

     

    - hidden TP (X000 pips ) & SL (200), we not suppose to TP any of open winning positions (NO!), they are needed to compensate losing end of open trades. When Pips >= MinProfit, all the +/- positions MUST be closed immediately using my while loop.. I suggest 200 pips SL or more depends on your equity in case you have no choice but need to slam some too negative positions using the EA.

    - dynamic magic ID within-range generation, make sure debug the code I shared, ( i found little bugs) as when the magic # attached to each order not within the range, the EA lose control to them (not able to close these orders).. this is damn good feature to hopefully conFUSE the broker.

    - ATR_pips although very useful to determine ranging/quiet market to enter the trades, but storm comes after the quiet..especially 8-12pm NY session.. i have up to 13 fury open trades up to -1000 pips while hit by 29-Sep, 10:00am USD GDP news.. , luckily i was able to escape with + pips.. be safe is having the EA off during this critical hrs..

    you may want to write some logic like below to prevent the EA to open more buy/sell limit when you were in dilemma of opening trades more then 5 ?

    if (MyOrdersTotalActive() >= 5) return(0); //to prevent the EA to open more buy/sell limit ?

    so, the precaution is NOT to have multiply lots like 0.1, 0.2, 0.4 or increment lot 0.10,0.11,0.12,0.13 that some folks had suggested before .. that will blow your equity anytime ! You can have larger fixed lot size during Asian/Euro Session & maybe more than 1 instance, but be play safe to switch back to smallest lot, 1 instance during NY session.

    - I also mentioned abt monitoring DIFF of your local PC time vs your Broker server time after taken consideration adding the offset.. the delays shouldn't more than 100s.. if yes, do the sendmail features..

     

     

    - Print out all your vital variables on screen useful for displaying purposes & debugging logic flaws as well ..

    this EA is heavily managing its range of magic # on subroutines like TotalProfit(), MyOrdersTotalActive() or MyOrdersTotal()...

    like case if dynamic magic # not managing its positions properly, MyOrdersTotalActive() or MyOrdersTotal() will not show the correct qty of trades..

     

    Comment("\n\n\n******* CABLERUN COLLECTING $$ WEALTH $$ IN ACTION *********"

     

    +"\n"

    +" M15 ATR PrePips2 = ", ATRPrePips2," for period of ",ATRPeriod2," (",ATRDnLimit1,"<=x<=",ATRUpLimit1,") or (",ATRDnLimit2,"<=x<=",ATRUpLimit2,") or (",ATRDnLimit3,"<=x<=",ATRUpLimit3,")"

    +"\n"

    +" M15 ATR PrePips1 = ", ATRPrePips1," for period of ",ATRPeriod1," (",ATRDnLimit1,"<=x<=",ATRUpLimit1,") or (",ATRDnLimit2,"<=x<=",ATRUpLimit2,") or (",ATRDnLimit3,"<=x<=",ATRUpLimit3,")"

    +"\n"

    +" M15 ATR Pips = ", ATRPips," for period of 0 (",ATRDnLimit1,"<=x<=",ATRUpLimit1,") or (",ATRDnLimit2,"<=x<=",ATRUpLimit2,") or (",ATRDnLimit3,"<=x<=",ATRUpLimit3,")"

    +"\n"

    +" Total Pips = ", DoubleToStr(Pips,0)

    +"\n"

    +" Active Orders = ", MyOrdersTotalActive()

    +"\n"

    +" Total Orders = ", MyOrdersTotal()

    +"\n"

    +" Magic = ", Magic, " (",MagicRangeLow," <= Magic <= ",MagicRangeHigh,")"

    +"\n"

    +" Active until = ", ActiveTime

    +"\n"

    +" PriceComment = "+ PriceComment

    +"\n"

    +" CandleStick Pattern = ", CandleStick_Analyzer()

    +"\n"

    +" Local Current Time = ", Local_Time

    +"\n"

    +" Fx Server Time = ", Server_Time

    +"\n"

    +" DIFF = ", Diff," seconds" );

     

     

    What else more ? that's the thoughts of the week .. basically as mentioned above should be needed as a typically scalper EA like CR ..

    Azam, clevereto all folks that had been following with this threads (not active nowadays, i dun know why) should be earning a lot happy pips by now.

    So, i wish all happy pips to all by now.

     

    ( I consider this is my last comment on this thread )

  11. This is killer code to nasty brokers that I invented this morning !!!!! YOur broker will hate you the most !

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

     

    //This is your External variable

    int Magic =187939 ; // any of arbitrary # range from 100000 <= Magic Range <= 400000

    int MagicRangeLow =100000;

    int MagicRangeHigh =400000;

    bool MagicRandom = TRUE;

     

     

    int start() {

     

    if (MagicRandom) {

    MathSrand(TimeLocal());

    int a=0, myrandom;

    while(a<10000) {

    myrandom = MathRand()%976398;

    a++;

    }

    if (DayOfWeek() == 1) Magic = 247872-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000

    if (DayOfWeek() == 2) Magic = 186780-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000

    if (DayOfWeek() == 3) Magic = 369878-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000

    if (DayOfWeek() == 4) Magic = 165034-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000

    if (DayOfWeek() == 5) Magic = 225563-myrandom; // any of arbitrary # range from 100000 <= Magic Range <= 400000

    }

     

    if (!MagicRandom) Magic = 867739; // if dun want random magic#, then this will be this EA instance fix magic#

     

    ...

    ..

     

    ....

    ** you have to change ALL subroutines that have the statement OrderMagicNumber() = XXX to as below...

    OrderMagicNumber()>= MagicRangeLow && OrderMagicNumber()<= MagicRangeHigh

     

    Should be 10 minutes coding job...

     

    If you want to create 2 or 3 more instance EA running together, make sure every EAs have no MagicRangeLow/High overlap.

     

     

    Hi muruku,

     

    Could it be possible to create a routine to change the magic# automatically (randomly or not), from time to time?

     

    Thanks.

  12. Hi berusnet, you can open that codes in metaeditor, hover your mouse to keyword iCustom, press F1 to understand what is

     

    iCustom(NULL,PERIOD_M15,"ATR_Pips",ATR_Period,0,0); means

    |------- current bar ATR_pips reading

    double iCustom( string symbol, int timeframe, string name, int mode, int shift)

    |__ ATR_pips reading is held by index 0 in its indicators

     

    |------- The third bar counting b/ward ATR_pips reading

    double iCustom( string symbol, int timeframe, string name, int mode, 3)

    |__ ATR_pips reading is held by index 0 in its indicators

    etc etc ...

     

     

     

    Hi muruku . A question from e newbie of mql code. I starting with this 3D to study mql code.

     

    //double ATRPips     =iCustom(NULL,PERIOD_M15,"ATR_Pips",ATR_Period,0,0);
    
    double ATRPips =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,0);
    double ATRPrePips1 =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,ATRPeriod1);
    double ATRPrePips2 =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,ATRPeriod2);
    

     

    1- In the first line (that is disabled-comment) you use ATR_Period as parameter so the ATR_Pips indicator setting in the chart is "ovverride" .. true ?

    2- In the others line you don't pass this parameter , so the value depend from the ATR_Pips indicator setting in the chart....true?

     

    My question is : why you prefer the second "option" , and never use ATR_Period variable?

     

    In other words :

     

    code 1-double ATRPrePips1 =iCustom(NULL,PERIOD_M15,"ATR_Pips",0,ATRPeriod1);

     

    code 2-double ATRPrePips1 =iCustom(NULL,PERIOD_M15,"ATR_Pips",ATR_Period,0,ATRPeriod1);

     

    Why you prefer code 1 ?

     

    thanks in advance

×
×
  • Create New...