Jump to content

tom1713006007

Members
  • Posts

    89
  • Joined

  • Last visited

Posts posted by tom1713006007

  1. Re: Grace Groner the Secret Millionaire

     

    :?: :?: :?: :?: :?:

    .

    Many wealthy, rich or super rich people donate in their abundance..

    They still enjoying big percentages of their wealth..

    Say..they use 90% and donate 10%..

     

    But this lady, donate in her limitation.. and she just used a very very small of her money to live and donate almost all of her money..

    Say..she only used 3% and donate the rest 97%..

     

    90:10 compare to 3:97...................

     

    Can see the point now?

    .

    [-O< [-O< [-O< ................ :)>- :)>-

  2. Re: Grace Groner the Secret Millionaire

     

    Come on guys, :hammer: :hammer: :hammer:

    this was not a matter of investment strategy, even it took place in this case.

    This was more on What someone can do for someone else.. if they care enough...

    Even with "limited" financial wealth, Grace donated much much bigger than average wealthy people donate.

     

    This was about care..

    This was about thinking BIG..

    Which, the most beauty part was, that she donated all the investment result, without use it for herself..

    :-? :-? :-? :-? :-?

  3. Guys,

    have some time to read this inspirational story, made by a great lady name Grace Groner.

    GBU Grace.. =D> =D> =D> =D> =D> =D> =D> =D>

     

     

    http://i47.tinypic.com/oq9deh.jpg Courtesy of BV on Money

     

    Grace Groner lived as a secret millionaire in a modest, sparsely-furnished one-bedroom house. When she died at the age of 100, she shocked the world by leaving her alma mater, Lake Forest College, $7 million. It's not every day that someone donates her fortune to a worthy cause, after living a life of great financial restraint. The Chicago Tribune reports:

     

    Like many people who lived through the Great Depression, Grace Groner was exceptionally restrained with her money.

     

    She got her clothes from rummage sales. She walked everywhere rather than buy a car. And her one-bedroom house in Lake Forest held little more than a few plain pieces of furniture, some mismatched dishes and a hulking TV set that appeared left over from the Johnson administration.

     

    Her one splurge was a small scholarship program she had created for Lake Forest College, her alma mater. She planned to contribute more upon her death, and when she passed away in January, at the age of 100, her attorney informed the college president what that gift added up to.

     

    "Oh, my God," the president said.

     

    Groner's estate, which stemmed from a $180 stock purchase she made in 1935, was worth $7 million.

     

    The money is going into a foundation that will enable many of Lake Forest's 1,300 students to pursue internships and study-abroad programs they otherwise might have had to forgot. It will be an appropriate memorial to a woman whose life was a testament to the higher possibilities of wealth.

     

    A testament indeed. Grace Groner's spirit will live on through her amazing act of generosity, which will touch the lives of many students and positively influence greater society for years to come. Her act of charity is a beacon of inspiration in our trying economic times. Having lived through the Great Depression, she knew that Americans can survive anything, especially if we focus on helping each other. Although Groner was a millionaire she chose to use her money in a way that would benefit all, showing that her spiritual fortune was at least as great as her material wealth.

     

    via The Huffington Post

     

    Courtesy of BV on Money[spoiler:3ey3tm2d]http://www.bvonmoney.com/2010/03/05/secret-millionaire-donates-her-fortune-grace-groner/[/spoiler:3ey3tm2d]

  4. Re: G7_USD Indicator

     

    So you mean, that errors meant nothing, only a history or suffix mismatch. How to solve this? Download more history in mt4?Are you getting a same error with me when loading this indic? Thanks again,

     

    Just try by downloading a new fresh MT4 from a broker. Make sure what suffix is used by that broker.

    e.g. suffix m for mini ibfx, no suffix for standard ibfx, fxdd, fxpro, alpari.

    Put the same suffix at the indi setting and see how it works.

    Once it works, you can back using your broker's MT4 and set a proper setting. :-bd

  5. Re: G7_USD Indicator

     

    Hi, Has anyone spotted the "Zero Divide" error in Expert Tab when loading this Indicator? I think a correction in code will be fine.

     

    Thanks

     

    Hi,

    I don't think there is a problem with the code.

    Zero Divide error usually happens when your currency symbol did not match with the code inside the indi.

    Check your broker's pair symbol. If it is a standard one e.g. EURUSD instead of EURUSDm or EURUSD. etc, just leave the the suffix setting blank at indi's inputs.

     

    It has "m" as default suffix. Delete it when you use a standard pair.

     

    Hope this help.. :-bd

  6. Re: share my trading system 30m

     

    a new strategy, is a very simple strategy

     

    can be used in any timeframe

     

    indicators for opening orders: CCI_Woodies_Paterns_v1, BrainTrend2Sig.

     

    close order: NonLagAMA change of direction against the order,

    CCI_Woodies_Paterns_v1 signal against order, optional.

     

    filter:

     

    buy: High_Low (ZigZag), zigzag should be at the bottom, NonLagAMA should be in the same direction.

    sell: zigzag on top, NonLagAMA should be in the same direction.

     

    stoploss: 10 pips away from the current fractal.

     

    http://www.mediafire.com/?zzihhy1rezz

     

    small change, added as a filter ChandelierStops_v1.

     

    The link is not available anymore..

    Can you or someone re-upload it ?

    Thanks

  7. Re: XXL M1 Scalping System

     

    Hello Tom,

     

    can't post screen here, it is in the package, where also you can find my method to solve the repainting issue.

     

    I use a little martingale strategy to catch the trades. I enter trades only after the following rule :

     

    I check what RSI it is when level 3 semafor shows up first time. Should be over at least 75+.

    Then I monitor it and enter the trade when RSI dropps below 80, better 75-. Mostly entering at the first showup also works fine, if you look back. Vice versa 15-20 for buy trades of course.

     

    But what helps me here at most are the OANfx bands. I presume you haven't downloaded the package yet, the semafor must show up near these bands or even in them or piercing. If you look at the screenshot, you'll get it.

     

    I have no confidence in the semafor alone ! Only that combination with oanfx bands and RSI gives me a good entry / exit.

    If TP is not reached, I exit trades at the next level 2 semafor at least.

     

    And if a trade really goes against me (mostly news times or end of month etc), I enter with double lot sizes at -30 to -60 depends on range of the pair. Slower pairs like EURCHFG are TP 8 SL 30, GBPJPY is SL 60 TP 15+, depends on day.

     

    Well, I seem to get along quite good, made some 2k5 EUR with 0.1 lots in 6 weeks :) I am happy with that, at least.

    I have a bankroll of around 5k and trade 0.1 0.2 0.4 lots max. per pair, strick MM of course. Max loss was 150 EUR a day, max gain around 300.

     

    Cheers, xxl

     

    XXL,

    Thanks for this encouraging sharing..

    Will have a try on your TS this coming weeks..

    All d best for you and kudo with you.. :-bd

     

    Regards,

    Tom

  8. Re: (Ask) How to get comments showing on MT4

     

    zoop,

    here is the code.

    Just add the blue command to your previous original EA.

    Please be precise with any of ; ) } etc..

    Hope this help you ;)

     

    //|---------moving average filter

     

    double MAF=iMA(Symbol(),0,MAPeriod,0,MAMethod,MAPrice,i);

     

    string MABUY="false";string MASELL="false";string EAcomment;

     

    EAcomment= "No suggestion";

    if((MAFilter==false)||(MAFilter&&Bid>MAF))

    {MABUY="true";EAcomment ="Price now above MAF- trade long";}

    if((MAFilter==false)||(MAFilter&&Ask<MAF))

    {MASELL="true";EAcomment ="Price now below MAF- trade short";}

     

     

     

    // Comment section ====================

     

    if(fullcomment)

    {

    //========Comment Start=======

     

    Comment ("","\n","\n","\n","\n","\n",

    "\n","...................................... ",

    "\n","MA adviser",

    "\n","...................................... ",

    "\n",( "Current Open Trade Profit/Loss is : ",AccountProfit()),

    "\n","...................................... ",

    "\n",( "Account Currency:",AccountCurrency()),

    "\n","...................................... ",

     

    "\n","Currency Spread is ",MarketInfo(Symbol(),MODE_SPREAD),

    "\n","...................................... ",

    "\n",( "Leverage 1:",AccountLeverage()),

    "\n","...................................... ",

    "\n",( "Account Balance:",AccountBalance()),

    "\n","...................................... ",

    "\n" ,"Current Broker Time Is ",TimeToStr(TimeCurrent())

    "\n\nEA suggestion: ", EAcomment

    );

    }

  9. Re: (Ask) How to get comments showing on MT4

     

    i have simple EMA ea, price above ema is a buy. price below ema is a sell

     

    here is the filter code

     

     

    //|---------moving average filter

     

    double MAF=iMA(Symbol(),0,MAPeriod,0,MAMethod,MAPrice,i);

     

    string MABUY="false";string MASELL="false";

     

    if((MAFilter==false)||(MAFilter&&Bid>MAF))

    {MABUY="true";Comment ("price now above MAF- trade long");}

    if((MAFilter==false)||(MAFilter&&Ask<MAF))

    {MASELL="true";Comment ("price now below MAF- trade short");}

     

     

    question, how would i project ema status as comments showing up on mt4 graph?

     

     

    eg, price now above MAF- trade long

     

    price now below MAF- trade short

     

     

     

    thanks...

     

    Hi zoop,

    just add the blue command I add to your original post.

    Including the { in front of MABUY="true"; and MASELL="true";

    Hope this help you.. :D

  10. Re: XXL M1 Scalping System

     

    XXL,

    I think it will help if you can post your trading screen..

    I myself experienced the ZZ repainting, sometime it kept moving from candle to candle.. and not sure which one will be the true ZZ level until it was too late to open a trade.

     

    How do you solve this? Especially at M1. Please share with us..

     

    Regards,

    Tom

  11. Re: Classic price chart pattern trading with T101 14 pairs

     

    All my friends, welcome onboard!

    This is my guess for the coming days as well. The major trend is upper trend. But I expect a retracement at the previous low resistant level which is also the fib-level. See text in chart.

     

    http://www.formulatrader.com/download/bild/t101chart19.gif

     

    Nice guess finimej :-bd

    Elliot and Fibo hand in hand :shand:

     

    Keep posting friend..

  12. Re: All About FXCM

     

    I have warned you guys earlier, but nobody listen.

     

    Problems:

     

    1. Open trades, will never appear on your platforms until 5 minutes, worse case never open at all in which i have to call customer service to check.

     

    2. Close trades, will never close trades until 5 minutes, it means your trades in losing position then you can close.

     

    3. Platform hang, case like trade context is busy etc.

     

    If you use EA, then all your trades gone mad.

     

    Complain to them? No use, what is their answers? Simple, they used boston technology bla bla bla whereby it is directly link to the interbank and they are not market maker etc etc

     

    See attached image, everything is possible, they will do anything to works like casino.

     

    Scary... :hammer:

    Any suggestion which better broker to go with? :?:

    Suggestion needed..thanks

  13. Re: Trade*manager EA - Update with .mq4 version

     

    I add some codes and here they are,

    with MaxOpenTrades = 30;

     

    Enjoy :)>-

     

    #property copyright "Copyright © 2009, Sterling Blackstone"

    #property link "http://www.sterlingblackstone.com"

     

    #include <WinUser32.mqh>

    /*

    #import "MTFTP.dll"

    string gConnect(string a0, string a1, string a2, string a3);

    #import

    */

    string gs_76 = "1.6";

    extern bool TradeEnabled = true;

    extern int TradeSpacing = 20;

    extern int TradeTakeProfit = 20;

    extern double TradeLotSize = 0.1;

    extern int TradeStopLoss = 0;

    extern int TradeMinRange = 0;

    extern bool TradeCloseAll = FALSE;

    extern string AverageHeader = "!=!=!Average Settings!=!=!";

    extern bool AverageDynamic = FALSE;

    extern double AveragePercentSpace = 0.0;

    extern double AveragePercentTP = 0.0;

    extern double AveragePercentSL = 0.0;

    extern int AverageDays = 20;

    extern int AverageMonths = 3;

    extern bool InstantOrders = TRUE;

    extern int MaxSpread = 8; //300;

    extern string DisplayHeader = "!=!=!Display Settings!=!=!";

    extern bool DisplayOn = TRUE;

    extern color DisplayTextColor = LightGray;

    extern color DisplayDataColor = White;

    extern int DisplayFontSize = 12;

    extern bool DisplayArrows = TRUE;

    extern int DisplayCornerMain = 1;

    extern int DisplayCornerAvg = 0;

    extern bool DisplayShowAnchor = TRUE;

    extern color DisplayAnchorClr = LightBlue;

    extern bool DisplayShowUpLine = TRUE;

    extern color DisplayUpLineClr = Red;

    extern bool DisplayShowDownLine = TRUE;

    extern color DisplayDownLineClr = Green;

    extern string NotificationHeader = "!=!=!Notification Settings!=!=!";

    extern bool NotifyAlerts = TRUE;

    extern bool NotifyLog = TRUE;

    extern string OtherTradeHeader = "!=!=!Other Trade Settings!=!=!";

    extern int TradeMagicNumber = 12345;

    extern int TradeMaxAttempts = 5;

    extern int MaxOpenTrades = 30;

    int NoOfTrades = 0;

    string gs_260 = "Trade Manager";

    int g_slippage_268 = 0;

    bool gi_272;

    bool gi_276;

    int gi_unused_280;

    int gi_284;

    double gd_288;

    double g_bid_296;

    double gd_304;

    double gd_312;

    double gd_320;

    double gd_328;

    double gd_336;

    double gd_344;

    int g_count_352;

    int g_count_356;

    double gd_360;

    string gs_368;

    int gi_376;

    bool gi_380;

    bool gi_384;

    bool gi_388 = TRUE;//FALSE;

    int gi_392 = -1;

     

    int init() {

    gi_276 = TRUE;

    if (TradeCloseAll) {

    if (MessageBox("Close all trades?", "Close All Requested", MB_YESNO|MB_ICONQUESTION) == IDYES) {

    closeAllTrades();

    if (MessageBox("All Trades Closed. Continue running?", "Enable Trading", MB_YESNO|MB_ICONQUESTION) == IDYES) TradeEnabled = TRUE;

    else TradeEnabled = FALSE;

    }

    }

    resetADR();

    int l_stoplevel_0 = MarketInfo(Symbol(), MODE_STOPLEVEL);

    if (TradeStopLoss < l_stoplevel_0 && TradeStopLoss > 0) logError("TradeStopLoss value was less than Stop Level! Symbol = " + Symbol() + " Stop Loss = " + TradeStopLoss + " Stop Level = " + l_stoplevel_0);

    if (TradeTakeProfit < l_stoplevel_0 && TradeTakeProfit > 0) logError("TradeTakeProfit value was less than Stop Level! Symbol = " + Symbol() + " Take Profit = " + TradeTakeProfit + " Stop Level = " + l_stoplevel_0);

    if (TradeStopLoss < TradeSpacing && TradeStopLoss > 0) logError("TradeStopLoss value was less than TradeSpacing! Symbol = " + Symbol() + " Stop Loss = " + TradeStopLoss + " Trade Spacing = " + TradeSpacing);

    if (TradeTakeProfit < TradeSpacing && TradeTakeProfit > 0) logError("TradeTakeProfit value was less than TradeSpacing! Symbol = " + Symbol() + " Take Profit = " + TradeTakeProfit + " Trade Spacing = " + TradeSpacing);

    TradeLotSize = NormalizeDouble(TradeLotSize, 2);

    gi_272 = TRUE;

    gi_376 = 0;

    gi_unused_280 = 0;

    g_count_352 = 0;

    g_count_356 = 0;

    checkUserAuth(1);

    updateDisplay();

    return (0);

    }

     

    void checkUserAuth(int ai_0) {

    /* if (IsDemo()) {

    gs_368 = "DEMO";

    gi_380 = TRUE;

    return;

    }

    string l_acc_number_4 = AccountNumber();

    string l_str_concat_12 = StringConcatenate("p", l_acc_number_4);

    if (QuickCheck("ftp.powertradeliveauth.com", l_str_concat_12, AccountNumber(), ai_0)) {*/

    gs_368 = "LIVE";

    gi_380 = TRUE;

    /* return;

    }

    gs_368 = "INVALID";

    gi_380 = FALSE;*/

    }

     

    int deinit() {

    ObjectsDeleteAll();

    return (0);

    }

     

    int start() {

    int li_0;

    int l_ticket_4;

    double l_price_8;

    double l_price_16;

    bool l_bool_24;

    checkUserAuth(0);

    if (gi_380) {

    if ((Ask - Bid) / Point >= MaxSpread) logError("Trade Manager skipping this tick. Spread is too high! Bid=" + Bid + " Ask=" + Ask);

    else {

    if (GlobalVariableCheck("$EnableTrading")) gi_384 = GlobalVariableGet("$EnableTrading");

    else gi_384 = TRUE;

    if (GlobalVariableCheck("$TradeManagerReset")) {

    li_0 = GlobalVariableGet("$TradeManagerReset");

    if (li_0 == 1) {

    Print("Recieved a \"TradeManagerReset\" command from Profit Manager!");

    gi_272 = TRUE;

    GlobalVariableSet("$TradeManagerReset", 0);

    }

    }

    resetADR();

    if (gi_272) {

    resetAnchorPoint(Bid);

    gi_unused_280 = 0;

    gi_272 = FALSE;

    }

    if (Ask <= gd_304) {

    gi_376 = 3;

    if (TradeEnabled && gi_384 && checkMinRange()) {

    if (InstantOrders) {

    l_price_8 = Ask - TradeStopLoss * Point;

    l_price_16 = Ask + TradeTakeProfit * Point;

    if (TradeStopLoss != 0 && TradeTakeProfit != 0) l_ticket_4 = openOrder(Symbol(), OP_BUY, TradeLotSize, Ask, l_price_8, l_price_16, gs_260);

    else {

    if (TradeStopLoss != 0) l_ticket_4 = openOrder(Symbol(), OP_BUY, TradeLotSize, Ask, l_price_8, 0, gs_260);

    else {

    if (TradeTakeProfit != 0) l_ticket_4 = openOrder(Symbol(), OP_BUY, TradeLotSize, Ask, 0, l_price_16, gs_260);

    else l_ticket_4 = openOrder(Symbol(), OP_BUY, TradeLotSize, Ask, 0, 0, gs_260);

    }

    }

    if (l_ticket_4 < 1) logError("Error placing trade: BUY " + TradeLotSize + " Lots at " + Ask + " SL/TP = " + l_price_8 + "/" + l_price_16);

    else placeLongIndicator(Ask);

    } else {

    l_ticket_4 = openOrder(Symbol(), OP_BUY, TradeLotSize, Ask, 0, 0, gs_260);

    if (l_ticket_4 < 1) logError("Error placing market trade: BUY " + TradeLotSize + " Lots at " + Ask + " SL/TP = " + l_price_8 + "/" + l_price_16);

    else {

    if (!OrderSelect(l_ticket_4, SELECT_BY_TICKET, MODE_TRADES)) logError("OrderSelect failed for ticket #" + l_ticket_4 + " after opening market order. No SL or TP set!");

    l_price_8 = OrderOpenPrice() - TradeStopLoss * Point;

    l_price_16 = OrderOpenPrice() + TradeTakeProfit * Point;

    NormalizeDouble(l_price_8, MarketInfo(Symbol(), MODE_DIGITS));

    NormalizeDouble(l_price_16, MarketInfo(Symbol(), MODE_DIGITS));

    if (TradeStopLoss != 0 && TradeTakeProfit != 0) l_bool_24 = OrderModify(l_ticket_4, OrderOpenPrice(), l_price_8, l_price_16, 0);

    else {

    if (TradeStopLoss != 0) l_bool_24 = OrderModify(l_ticket_4, OrderOpenPrice(), l_price_8, OrderTakeProfit(), 0);

    else

    if (TradeTakeProfit != 0) l_bool_24 = OrderModify(l_ticket_4, OrderOpenPrice(), OrderStopLoss(), l_price_16, 0);

    }

    if (l_bool_24 == FALSE) logError("OrderModify failed for ticket #" + l_ticket_4 + " after opening market order. No SL or TP set!");

    }

    placeLongIndicator(Ask);

    }

    }

    gd_312 = gd_304;

    gd_304 = gd_312 - gd_288 * Point;

    resetDownLine(gd_304);

    gd_344 = gd_304 + (gd_288 + TradeSpacing) * Point;

    }

    if (Bid >= gd_328) {

    gi_376 = 2;

    if (TradeEnabled && gi_384 && checkMinRange()) {

    if (InstantOrders) {

    l_price_8 = Bid + TradeStopLoss * Point;

    l_price_16 = Bid - TradeTakeProfit * Point;

    NormalizeDouble(l_price_8, MarketInfo(Symbol(), MODE_DIGITS));

    NormalizeDouble(l_price_16, MarketInfo(Symbol(), MODE_DIGITS));

    if (TradeStopLoss != 0 && TradeTakeProfit != 0) l_ticket_4 = openOrder(Symbol(), OP_SELL, TradeLotSize, Bid, l_price_8, l_price_16, gs_260);

    else {

    if (TradeStopLoss != 0) l_ticket_4 = openOrder(Symbol(), OP_SELL, TradeLotSize, Bid, l_price_8, 0, gs_260);

    else {

    if (TradeTakeProfit != 0) l_ticket_4 = openOrder(Symbol(), OP_SELL, TradeLotSize, Bid, 0, l_price_16, gs_260);

    else l_ticket_4 = openOrder(Symbol(), OP_SELL, TradeLotSize, Bid, 0, 0, gs_260);

    }

    }

    if (l_ticket_4 < 1) logError("Error placing instant trade: SELL " + TradeLotSize + " Lots at " + Bid + " SL/TP = " + l_price_8 + "/" + l_price_16);

    else placeShortIndicator(Bid);

    } else {

    l_ticket_4 = openOrder(Symbol(), OP_SELL, TradeLotSize, Bid, 0, 0, gs_260);

    if (l_ticket_4 < 1) logError("Error placing market trade: SELL " + TradeLotSize + " Lots at " + Bid + " SL/TP = " + l_price_8 + "/" + l_price_16);

    else {

    if (!OrderSelect(l_ticket_4, SELECT_BY_TICKET, MODE_TRADES)) logError("OrderSelect failed for ticket #" + l_ticket_4 + " after opening market order. No SL or TP set!");

    l_price_8 = OrderOpenPrice() + TradeStopLoss * Point;

    l_price_16 = OrderOpenPrice() - TradeTakeProfit * Point;

    NormalizeDouble(l_price_8, MarketInfo(Symbol(), MODE_DIGITS));

    NormalizeDouble(l_price_16, MarketInfo(Symbol(), MODE_DIGITS));

    if (TradeStopLoss != 0 && TradeTakeProfit != 0) l_bool_24 = OrderModify(l_ticket_4, OrderOpenPrice(), l_price_8, l_price_16, 0);

    else {

    if (TradeStopLoss != 0) l_bool_24 = OrderModify(l_ticket_4, OrderOpenPrice(), l_price_8, OrderTakeProfit(), 0);

    else

    if (TradeTakeProfit != 0) l_bool_24 = OrderModify(l_ticket_4, OrderOpenPrice(), OrderStopLoss(), l_price_16, 0);

    }

    if (l_bool_24 == FALSE) logError("OrderModify failed for ticket #" + l_ticket_4 + " after opening market order. No SL or TP set!");

    }

    placeShortIndicator(Bid);

    }

    }

    gd_336 = gd_328;

    gd_328 = gd_336 + gd_288 * Point;

    resetUpLine(gd_328);

    gd_320 = gd_328 - (gd_288 + TradeSpacing) * Point;

    }

    if (Ask <= gd_320 && gi_376 == 2) {

    gd_320 -= gd_288 * Point;

    gd_328 -= gd_288 * Point;

    resetUpLine(gd_328);

    }

    if (Bid >= gd_344 && gi_376 == 3) {

    gd_344 += gd_288 * Point;

    gd_304 += gd_288 * Point;

    resetDownLine(gd_304);

    }

    updateDisplay();

    gi_272 = FALSE;

    }

    }

    return (0);

    }

     

    int checkMinRange() {

    if (TradeMinRange == 0) return (1);

    for (int l_pos_0 = OrdersTotal() - 1; l_pos_0 >= 0; l_pos_0--) {

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

    if (OrderMagicNumber() == TradeMagicNumber) {

    if (OrderType() == OP_BUY && MathAbs((OrderOpenPrice() - Ask) / Point) <= TradeMinRange) {

    Print("BUY order #" + OrderTicket() + " was too close to new order! OrderOpenPrice=" + OrderOpenPrice() + " Ask =" + Ask);

    return (0);

    }

    if (OrderType() == OP_SELL && MathAbs((OrderOpenPrice() - Bid) / Point) <= TradeMinRange) {

    Print("SELL order #" + OrderTicket() + " was too close to new order! OrderOpenPrice=" + OrderOpenPrice() + " Bid =" + Bid);

    return (0);

    }

    }

    }

    }

    return (1);

    }

     

    void resetAnchorPoint(double a_price_0) {

    Print("Resetting the anchor point to: " + Bid);

    gi_284 = Ask - Bid;

    gd_288 = TradeSpacing + gi_284 / Point;

    g_bid_296 = Bid;

    if (DisplayShowAnchor) {

    ObjectDelete("AnchorLine");

    ObjectCreate("AnchorLine", OBJ_HLINE, 0, Time[0], a_price_0);

    ObjectSet("AnchorLine", OBJPROP_COLOR, DisplayAnchorClr);

    ObjectSet("AnchorLine", OBJPROP_WIDTH, 2);

    }

    gd_344 = 999;

    gd_328 = Ask + TradeSpacing * Point;

    resetUpLine(gd_328);

    gd_320 = 0;

    gd_304 = Bid - TradeSpacing * Point;

    resetDownLine(gd_304);

    gi_unused_280 = 0;

    gi_376 = 1;

    }

     

    void resetUpLine(double a_price_0) {

    if (DisplayShowUpLine) {

    ObjectDelete("LongLine");

    ObjectCreate("LongLine", OBJ_HLINE, 0, Time[0], a_price_0);

    ObjectSet("LongLine", OBJPROP_COLOR, DisplayUpLineClr);

    ObjectSet("LongLine", OBJPROP_WIDTH, 2);

    }

    }

     

    void resetDownLine(double a_price_0) {

    if (DisplayShowDownLine) {

    ObjectDelete("ShortLine");

    ObjectCreate("ShortLine", OBJ_HLINE, 0, Time[0], a_price_0);

    ObjectSet("ShortLine", OBJPROP_COLOR, DisplayDownLineClr);

    ObjectSet("ShortLine", OBJPROP_WIDTH, 2);

    }

    }

     

    void placeLongIndicator(double a_price_0) {

    g_count_352++;

    ObjectCreate("LongArrow" + g_count_352, OBJ_ARROW, 0, Time[0], a_price_0);

    ObjectSet("LongArrow" + g_count_352, OBJPROP_COLOR, Green);

    ObjectSet("LongArrow" + g_count_352, OBJPROP_ARROWCODE, 3);

    ObjectSet("LongArrow" + g_count_352, OBJPROP_WIDTH, 3);

    }

     

    void placeShortIndicator(double a_price_0) {

    g_count_356++;

    ObjectCreate("ShortArrow" + g_count_356, OBJ_ARROW, 0, Time[0], a_price_0);

    ObjectSet("ShortArrow" + g_count_356, OBJPROP_COLOR, Red);

    ObjectSet("ShortArrow" + g_count_356, OBJPROP_ARROWCODE, 3);

    ObjectSet("ShortArrow" + g_count_356, OBJPROP_WIDTH, 3);

    }

     

    void resetADR() {

    gd_360 = GetDailyRange(AverageDays, 0);

    if (AverageDynamic) {

    TradeSpacing = gd_360 * AveragePercentSpace / 100.0;

    TradeTakeProfit = gd_360 * AveragePercentTP / 100.0;

    TradeStopLoss = gd_360 * AveragePercentSL / 100.0;

    }

    }

     

    int openOrder(string as_0, int a_cmd_8, double ad_12, double a_price_20, double a_price_28, double a_price_36, string a_comment_44) {

    int l_cmd_64;

    int l_count_52 = 0;

    RefreshRates();

    CountTrades();

    if (NoOfTrades >= MaxOpenTrades) return (0);

    if (a_cmd_8 == OP_BUY || a_cmd_8 == OP_BUYSTOP || a_cmd_8 == OP_BUYLIMIT) l_cmd_64 = 0;

    else

    if (a_cmd_8 == OP_SELL || a_cmd_8 == OP_SELLSTOP || a_cmd_8 == OP_SELLLIMIT) l_cmd_64 = 1;

    AccountFreeMarginCheck(as_0, l_cmd_64, ad_12);

    int l_error_60 = GetLastError();

    if (l_error_60 > 0/* NO_ERROR */) {

    logError("Error during margin check while opening a new position: " + l_error_60);

    return (0);

    }

    int l_ticket_56 = OrderSend(as_0, a_cmd_8, ad_12, a_price_20, g_slippage_268, a_price_28, a_price_36, a_comment_44, TradeMagicNumber);

    if (l_ticket_56 > 0) {

    logInfo("Order #" + l_ticket_56 + " was opened successfully.");

    return (l_ticket_56);

    }

    while (l_count_52 < TradeMaxAttempts) {

    l_count_52++;

    l_error_60 = processErrors();

    if (l_error_60 == 1/* NO_RESULT */) {

    Sleep(1000);

    RefreshRates();

    if (a_cmd_8 == OP_BUY) a_price_20 = Ask;

    else

    if (a_cmd_8 == OP_SELL) a_price_20 = Bid;

    l_ticket_56 = OrderSend(as_0, a_cmd_8, ad_12, a_price_20, g_slippage_268, a_price_28, a_price_36, a_comment_44, TradeMagicNumber);

    if (l_ticket_56 > 0) {

    logInfo("Order #" + l_ticket_56 + " was opened successfully.");

    return (l_ticket_56);

    }

    }

    if (l_error_60 > 1/* NO_RESULT */) {

    logError(TimeToStr(TimeCurrent(), TIME_DATE|TIME_SECONDS) + " - ERROR: Failed to place order due to critical error.");

    return (0);

    }

    }

    logError(TimeToStr(TimeCurrent(), TIME_DATE|TIME_SECONDS) + " - ERROR: Failed to place order after " + TradeMaxAttempts + " tries.");

    return (0);

    }

     

    int closeOrder(int a_ticket_0, double a_lots_4) {

    double l_price_12;

    int li_20;

    int l_count_24 = 0;

    logInfo("Enter closeOrder with Ticket = " + a_ticket_0 + " Lots = " + a_lots_4);

    a_lots_4 = NormalizeDouble(a_lots_4, 2);

    while (l_count_24 < TradeMaxAttempts) {

    if (OrderSelect(a_ticket_0, SELECT_BY_TICKET)) {

    if (OrderType() == OP_BUY) l_price_12 = NormalizeDouble(MarketInfo(OrderSymbol(), MODE_BID), MarketInfo(OrderSymbol(), MODE_DIGITS));

    if (OrderType() == OP_SELL) l_price_12 = NormalizeDouble(MarketInfo(OrderSymbol(), MODE_ASK), MarketInfo(OrderSymbol(), MODE_DIGITS));

    logInfo("Calling OrderClose(" + OrderTicket() + "," + a_lots_4 + "," + l_price_12 + "," + g_slippage_268 + ")");

    if (OrderClose(OrderTicket(), a_lots_4, l_price_12, TradeMaxAttempts)) {

    logInfo("Order # " + OrderTicket() + " closed successfully...");

    return (1);

    }

    l_count_24++;

    li_20 = processErrors();

    if (li_20 > 1) {

    logError(TimeToStr(TimeCurrent(), TIME_DATE|TIME_SECONDS) + " - Failed to place order with serious error.. Manual closing of the order # " + OrderTicket() + " needed!");

    return (0);

    }

    RefreshRates();

    } else logInfo("OrderSelect by ticket failed during closeOrder!");

    }

    logError(TimeToStr(TimeCurrent(), TIME_DATE|TIME_SECONDS) + " - ERROR: Failed to place order after " + TradeMaxAttempts + " tries.. Manual closing of the order # " +

    OrderTicket() + " needed!");

    return (0);

    }

     

    void closeAllTrades() {

    for (int l_pos_0 = OrdersTotal() - 1; l_pos_0 >= 0; l_pos_0--) {

    if (OrderSelect(l_pos_0, SELECT_BY_POS, MODE_TRADES))

    if (OrderMagicNumber() == TradeMagicNumber) closeOrder(OrderTicket(), OrderLots());

    }

    }

     

    int processErrors() {

    bool l_bool_8;

    int l_count_12;

    int l_error_0 = GetLastError();

    logInfo("Last error: " + l_error_0);

    switch (l_error_0) {

    case 0/* NO_ERROR */:

    return (0);

    case 2/* COMMON_ERROR */:

    logError("System failure. Reboot the computer/check the server!");

    return (3);

    case 3/* INVALID_TRADE_PARAMETERS */:

    logError("Error of the logic of the EA!");

    return (3);

    case 4/* SERVER_BUSY */:

    logInfo("Trading server is busy! Wait for 2 minutes.");

    Sleep(120000);

    return (2);

    case 6/* NO_CONNECTION */:

    l_bool_8 = FALSE;

    l_count_12 = 0;

    logInfo("Disconnected!");

    while (!l_bool_8 || l_count_12 > 60) {

    Sleep(10000);

    logInfo("Connection not restored " + (10 * l_count_12) + " seconds passed!");

    l_bool_8 = IsConnected();

    if (l_bool_8) {

    logInfo("Connection restored");

    return (2);

    }

    l_count_12++;

    }

    logError("Connection problems!");

    return (3);

    case 8/* TOO_FREQUENT_REQUESTS */:

    logError("Frequent requests!");

    return (3);

    case 64/* ACCOUNT_DISABLED */:

    logError("Account is blocked!");

    return (3);

    case 65/* INVALID_ACCOUNT */:

    logError("Wrong account number!");

    return (3);

    case 128/* TRADE_TIMEOUT */:

    logWarning("Waiting of transaction timed out!");

    return (2);

    case 129/* INVALID_PRICE */:

    logWarning("Wrong price!");

    return (1);

    case 130/* INVALID_STOPS */:

    logWarning("Wrong stop!");

    return (1);

    case 131/* INVALID_TRADE_VOLUME */:

    logError("Wrong calculation of trade volume!");

    return (3);

    case 132/* MARKET_CLOSED */:

    logError("Market closed!");

    case 134/* NOT_ENOUGH_MONEY */:

    logError("Lack of margin for performing operation!");

    case 135/* PRICE_CHANGED */:

    logWarning("Prices changed!");

    return (1);

    case 136/* OFF_QUOTES */:

    logWarning("No price!");

    return (2);

    case 138/* REQUOTE */:

    logWarning("Requote again!");

    return (1);

    case 139/* ORDER_LOCKED */:

    logWarning("The order is in process. Program glitch!");

    return (2);

    case 141/* TOO_MANY_REQUESTS */:

    logError("Too many requests!");

    case 148:

    logError("Transaction volume too large!");

    }

    return (0);

    }

     

    void logError(string as_0) {

    if (NotifyAlerts) Alert(as_0);

    if (NotifyLog) logMessage(as_0);

    Print(as_0);

    }

     

    void logWarning(string as_0) {

    if (NotifyLog) logMessage(as_0);

    Print(as_0);

    }

     

    void logInfo(string as_0) {

    if (NotifyLog) logMessage(as_0);

    Print(as_0);

    }

     

    void logMessage(string as_unused_0) {

    }

     

    string getTradeEnabledString() {

    if (TradeEnabled) return ("TRUE");

    else return ("FALSE");

    }

     

    string getTrendDirectionString() {

    if (gi_376 == 0) return ("INIT");

    else {

    if (gi_376 == 1) return ("FINDING");

    else {

    if (gi_376 == 2) return ("UP");

    else

    if (gi_376 == 3) return ("DOWN");

    }

    }

    return ("");

    }

     

    string getTrendDirectionFont() {

    if (gi_376 == 0) return ("Times New Roman");

    else {

    if (gi_376 == 1) return ("Times New Roman");

    else {

    if (gi_376 == 2) return ("Times New Roman");

    else

    if (gi_376 == 3) return ("Times New Roman");

    }

    }

    return ("");

    }

     

    int getTrendDirectionColor() {

    if (gi_376 == 0) return (DisplayDataColor);

    else {

    if (gi_376 == 1) return (DisplayDataColor);

    else {

    if (gi_376 == 2) return (32768);

    else

    if (gi_376 == 3) return (255);

    }

    }

    return (0);

    }

     

    void updateDisplay() {

    int li_0 = 1;

    AdvancedComment(gi_276, DisplayCornerMain, li_0, gs_260 + " v" + gs_76, "", Gold, Gold, DisplayFontSize + 4, "Times New Roman", "Times New Roman");

    li_0++;

    li_0++;

    AdvancedComment(gi_276, DisplayCornerMain, li_0, "Account Type:", gs_368, DisplayTextColor, DisplayDataColor, DisplayFontSize, "Times New Roman", "Times New Roman");

    li_0++;

    AdvancedComment(gi_276, DisplayCornerMain, li_0, "Trade Enabled:", getTradeEnabledString(), DisplayTextColor, DisplayDataColor, DisplayFontSize, "Times New Roman", "Times New Roman");

    li_0++;

    AdvancedComment(gi_276, DisplayCornerMain, li_0, "Trade Spacing:", TradeSpacing, DisplayTextColor, DisplayDataColor, DisplayFontSize, "Times New Roman", "Times New Roman");

    li_0++;

    AdvancedComment(gi_276, DisplayCornerMain, li_0, "Take Profit:", TradeTakeProfit, DisplayTextColor, DisplayDataColor, DisplayFontSize, "Times New Roman", "Times New Roman");

    li_0++;

    AdvancedComment(gi_276, DisplayCornerMain, li_0, "Stop Loss:", TradeStopLoss, DisplayTextColor, DisplayDataColor, DisplayFontSize, "Times New Roman", "Times New Roman");

    li_0++;

    AdvancedComment(gi_276, DisplayCornerMain, li_0, "Lot Size:", DoubleToStr(TradeLotSize, 2), DisplayTextColor, DisplayDataColor, DisplayFontSize, "Times New Roman", "Times New Roman");

    li_0++;

    li_0++;

    AdvancedComment(gi_276, DisplayCornerMain, li_0, "Anchor:", DoubleToStr(g_bid_296, MarketInfo(Symbol(), MODE_DIGITS)), DisplayAnchorClr, DisplayDataColor, DisplayFontSize, "Times New Roman", "Times New Roman");

    li_0++;

    AdvancedComment(gi_276, DisplayCornerMain, li_0, "Short Entry:", DoubleToStr(gd_328, MarketInfo(Symbol(), MODE_DIGITS)), DisplayUpLineClr, DisplayDataColor, DisplayFontSize, "Times New Roman", "Times New Roman");

    li_0++;

    AdvancedComment(gi_276, DisplayCornerMain, li_0, "Long Entry:", DoubleToStr(gd_304, MarketInfo(Symbol(), MODE_DIGITS)), DisplayDownLineClr, DisplayDataColor, DisplayFontSize, "Times New Roman", "Times New Roman");

    li_0++;

    AdvancedComment(gi_276, DisplayCornerMain, li_0, "Trend:", getTrendDirectionString(), DisplayTextColor, getTrendDirectionColor(), DisplayFontSize, "Times New Roman", getTrendDirectionFont());

    li_0 = 1;

    AdvancedComment(gi_276, DisplayCornerAvg, li_0, "ADR Days:", AverageDays, DisplayTextColor, DisplayDataColor, DisplayFontSize, "Times New Roman", "Times New Roman");

    li_0++;

    AdvancedComment(gi_276, DisplayCornerAvg, li_0, "ADR:", DoubleToStr(gd_360, 0), DisplayTextColor, DisplayDataColor, DisplayFontSize, "Times New Roman", "Times New Roman");

    li_0++;

    AdvancedComment(gi_276, DisplayCornerAvg, li_0, "AMR Months:", AverageMonths, DisplayTextColor, DisplayDataColor, DisplayFontSize, "Times New Roman", "Times New Roman");

    li_0++;

    if (AverageMonths > 0) AdvancedComment(gi_276, DisplayCornerAvg, li_0, "AMR:", DoubleToStr(GetMonthlyRange(AverageMonths, 0), 0), DisplayTextColor, DisplayDataColor, DisplayFontSize, "Times New Roman", "Times New Roman");

    else AdvancedComment(gi_276, DisplayCornerAvg, li_0, "AMR:", DoubleToStr(GetMonthlyRange(AverageMonths, 0), 0), DisplayTextColor, DisplayDataColor, DisplayFontSize, "Times New Roman", "Times New Roman");

    gi_276 = FALSE;

    ObjectsRedraw();

    }

     

    int AdvancedComment(bool ai_0, int a_corner_4, int ai_8, string a_text_12, string a_text_20, color a_color_28, color a_color_32, int ai_36, string a_fontname_40, string a_fontname_48) {

    int l_fontsize_64;

    int l_x_76;

    int l_x_80;

    int li_56 = 10;

    int l_fontsize_60 = 10;

    int li_68 = 15;

    if (ai_36 > li_56) l_fontsize_64 = ai_36;

    else l_fontsize_64 = li_56;

    l_fontsize_60 = l_fontsize_64;

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

    l_x_76 = 5;

    l_x_80 = 100;

    } else {

    l_x_76 = 70;

    l_x_80 = 5;

    }

    int l_y_72 = ai_8 * li_68;

    if (ai_0) {

    ObjectDelete("PanelLabel" + ai_8 + a_corner_4);

    ObjectCreate("PanelLabel" + ai_8 + a_corner_4, OBJ_LABEL, 0, 0, 0);

    ObjectSetText("PanelLabel" + ai_8 + a_corner_4, a_text_12, l_fontsize_60, a_fontname_40, a_color_28);

    ObjectSet("PanelLabel" + ai_8 + a_corner_4, OBJPROP_CORNER, a_corner_4);

    ObjectSet("PanelLabel" + ai_8 + a_corner_4, OBJPROP_XDISTANCE, l_x_76);

    ObjectSet("PanelLabel" + ai_8 + a_corner_4, OBJPROP_YDISTANCE, l_y_72);

    ObjectDelete("PanelData" + ai_8 + a_corner_4);

    ObjectCreate("PanelData" + ai_8 + a_corner_4, OBJ_LABEL, 0, 0, 0);

    ObjectSet("PanelData" + ai_8 + a_corner_4, OBJPROP_CORNER, a_corner_4);

    ObjectSet("PanelData" + ai_8 + a_corner_4, OBJPROP_XDISTANCE, l_x_80);

    ObjectSet("PanelData" + ai_8 + a_corner_4, OBJPROP_YDISTANCE, l_y_72);

    }

    ObjectSetText("PanelData" + ai_8 + a_corner_4, a_text_20, l_fontsize_64, a_fontname_48, a_color_32);

    return (0);

    }

     

    int GetDailyRange(int ai_0, int ai_unused_4) {

    double l_ihigh_28;

    double l_ilow_36;

    bool li_8 = FALSE;

    int l_index_12 = 0;

    int l_count_16 = 0;

    double ld_ret_44 = 0;

    int l_day_20 = TimeDay(Time[0]);

    int l_day_24 = l_day_20;

    while (!li_8) {

    if (TimeDay(Time[l_index_12]) != l_day_24 && TimeDayOfWeek(Time[l_index_12]) != 0) {

    l_ihigh_28 = iHigh(Symbol(), PERIOD_D1, iBarShift(Symbol(), PERIOD_D1, Time[l_index_12]));

    l_ilow_36 = iLow(Symbol(), PERIOD_D1, iBarShift(Symbol(), PERIOD_D1, Time[l_index_12]));

    ld_ret_44 += (l_ihigh_28 - l_ilow_36) / Point;

    l_count_16++;

    if (l_count_16 == ai_0) li_8 = TRUE;

    }

    l_day_24 = TimeDay(Time[l_index_12]);

    if (l_index_12 < Bars - 1) l_index_12++;

    else li_8 = TRUE;

    }

    ld_ret_44 /= ai_0;

    return (ld_ret_44);

    }

     

    int GetMonthlyRange(int ai_0, int ai_unused_4) {

    double l_ihigh_28;

    double l_ilow_36;

    bool li_8 = FALSE;

    int l_index_12 = 0;

    int l_count_16 = 0;

    double ld_ret_44 = 0;

    if (ai_0 == 0) return (0);

    int l_month_20 = TimeMonth(Time[0]);

    int l_month_24 = l_month_20;

    while (!li_8) {

    if (TimeMonth(Time[l_index_12]) != l_month_24) {

    l_ihigh_28 = iHigh(Symbol(), PERIOD_MN1, iBarShift(Symbol(), PERIOD_MN1, Time[l_index_12]));

    l_ilow_36 = iLow(Symbol(), PERIOD_MN1, iBarShift(Symbol(), PERIOD_MN1, Time[l_index_12]));

    ld_ret_44 += (l_ihigh_28 - l_ilow_36) / Point;

    l_count_16++;

    if (l_count_16 == ai_0) li_8 = TRUE;

    }

    l_month_24 = TimeMonth(Time[l_index_12]);

    if (l_index_12 < Bars - 1) l_index_12++;

    else li_8 = TRUE;

    }

    ld_ret_44 /= ai_0;

    return (ld_ret_44);

    }

    /*

    bool QuickCheck(string as_0, string as_8, string as_16, bool ai_24) {

    string ls_28;

    int l_str2int_36 = StrToInteger(as_8);

    int li_40 = l_str2int_36 & 768 / 255 + 1;

    int li_44 = l_str2int_36 & 240 / 16 + 1;

    int li_48 = l_str2int_36 & 15;

    string l_var_name_52 = as_8;

    if (GlobalVariableCheck(l_var_name_52)) gi_392 = GlobalVariableGet(l_var_name_52);

    else GlobalVariableSet(l_var_name_52, -1);

    if (ai_24) {

    ls_28 = gConnect(as_0, as_8, as_16, "ROOT");

    if (ls_28 == "Connected") gi_388 = TRUE;

    else gi_388 = FALSE;

    GlobalVariableSet(l_var_name_52, DayOfWeek());

    } else {

    if (li_40 == DayOfWeek() && li_44 == Hour() && li_48 == Minute()) {

    if (gi_392 != DayOfWeek()) {

    ls_28 = gConnect(as_0, as_8, as_16, "ROOT");

    if (ls_28 == "Connected") gi_388 = TRUE;

    else gi_388 = FALSE;

    }

    GlobalVariableSet(l_var_name_52, DayOfWeek());

    }

    }

    return (gi_388);

    }

    */

     

    void CountTrades(){

    NoOfTrades = 0;

    for (int Counter = OrdersTotal() - 1; Counter >= 0; Counter--)

    {

    OrderSelect(Counter, SELECT_BY_POS);

    if (OrderType() == OP_BUY || OrderType() == OP_SELL)NoOfTrades++;

    }

    }

  14. Re: MTPredictor 6

     

    Here is the course. The course is the manual. If you read through the course it will 100% explain how to use MTP6.

    hxxp://rapid*share.de/files/48350938/1.pdf.html

    hxxp://rapid*share.de/files/48350939/2.pdf.html
    

    Thank You

     

    Can anyone please re-upload it on 4shared or mediafire..

     

    Thanks :shand:

×
×
  • Create New...