Jump to content

Forex_Trader

Members
  • Posts

    25
  • Joined

  • Last visited

Posts posted by Forex_Trader

  1. Greetings fellow traders and programmers,

     

    I need help updating the attached indicator to MT4 latest build. Thank you in advance for your effort.

     

    #property copyright "Dmitry Yakovlev, Russia,Omsk, WM R865705290089"
    #property link      "[email protected]"
    
    #property indicator_chart_window
    
    #import  "shell32.dll"           //Connect a dll (provided with Windows)             
     int ShellExecuteA(int hwnd,string Operation,string File,string Parameters,string Directory,int ShowCmd); 
    #import "user32.dll"
     int MessageBoxA(int hWnd ,string lpText,string lpCaption,int uType);
    #import
    
    extern string  _ModeProf="Profit 1-Floating. ,2-On Top";
    extern int     ModeProf=2;
    extern string  _orders="Show deals on the chart:";
    extern string  _Type = "0 All,-1 Sell,1 Buy";
    extern int     Type = 0;
    extern bool    CurOrders=true;
    extern int     lblSize=1;
    extern bool    HistOrders=true;
    extern bool    ShowProfits=true;
    extern int     ShiftProfits=0;
    extern bool    lShowTargets=true;
    //extern string    _donate1="?? ???? :-) WebMoney";
    //extern string    _donate2="R865705290089";
    
    double prev_profit=0, cur_prof5=0, prev_prof5=0;
    int wh=0;
    int init()
    {
      int i,total;
      if(lblSize<1) lblSize=1;
      if(lblSize>4) lblSize=4;
      
      //CheckDonate();
    
      deleteAll();
      
       ObjectCreate("curtime", OBJ_LABEL,0,0,0);
       ObjectSet("curtime", OBJPROP_CORNER,0);
       ObjectSet("curtime", OBJPROP_XDISTANCE,250);
       ObjectSet("curtime", OBJPROP_YDISTANCE,0);
    
       if(ModeProf==1)
       {
         ObjectCreate("profit2", OBJ_TEXT,0,0,0);
         //ObjectCreate("Account", OBJ_TEXT,0,0,0);
       }
       else if(ModeProf==2)
       {
         ObjectCreate("Account", OBJ_LABEL,0,0,0);
         ObjectSet("Account", OBJPROP_CORNER,0);
         ObjectSet("Account", OBJPROP_XDISTANCE,250);
         ObjectSet("Account", OBJPROP_YDISTANCE,20);
    
         ObjectCreate("profit2", OBJ_LABEL,0,0,0);
         ObjectSet("profit2", OBJPROP_CORNER,0);
         ObjectSet("profit2", OBJPROP_XDISTANCE,250);
         ObjectSet("profit2", OBJPROP_YDISTANCE,40);
       }
    
      ObjectDelete("VOSignal");
      /*ObjectCreate("VOSignal", OBJ_LABEL,0,0,0);
      ObjectSet("VOSignal", OBJPROP_CORNER,1);
      ObjectSet("VOSignal", OBJPROP_XDISTANCE,10);
      ObjectSet("VOSignal", OBJPROP_YDISTANCE,10);*/
    }
    int deinit()
    {
      deleteAll();
      for(int i=0;i<30;i++)
      {
         ObjectDelete(Symbol()+DoubleToStr(Period(),0)+"vopen"+i);
         ObjectDelete(Symbol()+DoubleToStr(Period(),0)+"vtake"+i);
         ObjectDelete(Symbol()+DoubleToStr(Period(),0)+"vstop"+i);
      }
    }
    //+------------------------------------------------------------------+
    //| Custom indicator iteration function                              |
    //+------------------------------------------------------------------+
    double Trunc(double v=0)
    {
      return(StrToDouble(DoubleToStr(v,0)));
    }
    
    double TakeProfit=0, StopLoss=0;
    
    
    int start()
    {
      datetime t1,t2,t3,t4;
      double TickValue=MarketInfo(Symbol(), MODE_TICKVALUE);
      int spread=MarketInfo(Symbol(), MODE_SPREAD);
      
      ObjectSetText("curtime", TimeToStr(TimeCurrent(),TIME_SECONDS)+" Leverage:"+DoubleToStr(AccountLeverage(),0)+" Spread:"+DoubleToStr(spread,0), 12, "Arial", Lime);
       int i;
      double sell_profit=0, buy_profit=0, tot_profit=0, 
             sell_points=0, buy_points=0, tot_points=0, prev_points=0, 
             plus_profit=0, minus_profit=0;
      for(i=0;i<OrdersTotal();i++)
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
      {
         if(OrderSymbol()==Symbol() && OrderType()==OP_SELL) { sell_profit+=OrderProfit(); sell_points+=Ask-OrderOpenPrice();}
         if(OrderSymbol()==Symbol() && OrderType()==OP_BUY) { buy_profit+=OrderProfit(); buy_points+=Bid-OrderOpenPrice();}
         
         if(OrderSymbol()==Symbol() ) 
            if(OrderProfit()>0) 
               plus_profit+=OrderProfit();
            else
               minus_profit+=OrderProfit();
      }
      tot_profit=sell_profit+buy_profit;
      tot_points=buy_points-sell_points;
      cur_prof5=Trunc(tot_points/5)*5;
      prev_prof5=Trunc(prev_points/5)*5;
    
      ObjectSetText("Account", DoubleToStr(AccountEquity(),2), 12, "Arial", Lime);
    
      //if(tot_profit>0) ObjectSetText("profit2", DoubleToStr(plus_profit,2)+"+"+DoubleToStr(minus_profit,2)+"=+"+DoubleToStr(tot_profit,2)+" (+"+DoubleToStr(tot_points/Point,0)+")", 12, "Arial", Lime);
      //else if(tot_profit<0) ObjectSetText("profit2", DoubleToStr(plus_profit,2)+""+DoubleToStr(minus_profit,2)+"="+DoubleToStr(tot_profit,2)+" ("+DoubleToStr(tot_points/Point,0)+")", 12, "Arial", OrangeRed);
      //else if(tot_profit==0) ObjectSetText("profit2","0", 12, "Arial", Yellow);
      if(tot_profit>0) ObjectSetText("profit2", "$"+DoubleToStr(plus_profit,2)+"+$"+DoubleToStr(minus_profit,2)+"=+$"+DoubleToStr(tot_profit,2), 12, "Arial", Lime);
      else if(tot_profit<0) ObjectSetText("profit2","$"+DoubleToStr(plus_profit,2)+"$"+DoubleToStr(minus_profit,2)+"=$"+DoubleToStr(tot_profit,2), 12, "Arial", OrangeRed);
      else if(tot_profit==0) ObjectSetText("profit2","0", 12, "Arial", Yellow);
      
      if(ModeProf==1)
      {
         ObjectSet("profit2", OBJPROP_TIME1, Time[0]+Period()*60*2);
         ObjectSet("Account", OBJPROP_TIME1, Time[0]+Period()*60*2);
         double hh=High[iHighest(NULL,0,MODE_HIGH,5,0)], ll=Low[iLowest(NULL,0,MODE_LOW,3,0)];
         ObjectSet("profit2", OBJPROP_PRICE1, hh+Point*9);
         ObjectSet("Account", OBJPROP_PRICE1, hh+Point*6);
      }
    
      //string VOSignal="flat";
      /*ObjectSetText("VOSignal", "flat", 12, "Arial", Blue);
      if(Close[0]>High[1] && Low[0]>Low[1] && Low[1]>Low[2])
      {
         ObjectSetText("VOSignal", "buy", 12, "Arial", Lime);
      }
      if(Close[0]<Low[1] && High[0]<High[1] && High[1]<High[2])
      {
         ObjectSetText("VOSignal", "sell", 12, "Arial", Red);
      }*/
      
      prev_profit=tot_profit;
      prev_points=tot_points;
      
      // <---orders
         if(HistOrders==true) ShowOrders(MODE_HISTORY);
         if(CurOrders==true) ShowOrders(MODE_TRADES);
      // --- orders >
      
      // <---targets
      if(lShowTargets) fShowTargets();
      // ---targets>
      WindowRedraw();
    }
    
    void deleteAll()
    {
      string tmp,prefix;
      int i,total;
    
      ObjectDelete("VOSignal");
      
      prefix="time_order_trades_";total=OrdersTotal();
      for(i=0;i<total+5;i++)
      {
         tmp=prefix+DoubleToStr(i,0);
         ObjectDelete(tmp);
         ObjectDelete(tmp+"O");
         ObjectDelete(tmp+"C");
         ObjectDelete(tmp+"OA");
         ObjectDelete(tmp+"CA");
         ObjectDelete(tmp+"Cprof1");
         ObjectDelete(tmp+"Cprof2");
      }
      prefix="time_order_hist_";total=OrdersHistoryTotal();
      for(i=0;i<total+15;i++)
      {
         tmp=prefix+DoubleToStr(i,0);
         ObjectDelete(tmp);
         ObjectDelete(tmp+"O");
         ObjectDelete(tmp+"C");
         ObjectDelete(tmp+"OA");
         ObjectDelete(tmp+"CA");
         ObjectDelete(tmp+"Cprof1");
         ObjectDelete(tmp+"Cprof2");
      }
    
      ObjectDelete("curtime");   
      ObjectDelete("profit");
      ObjectDelete("profit2");
      ObjectDelete("Account");
    
      ObjectDelete("time_TP");
      ObjectDelete("time_SL");
      ObjectDelete("time_mar");
      ObjectDelete("time_per");
      ObjectDelete("time_lot");
      ObjectDelete("time_lot100");
      ObjectDelete("time_vv1");
      ObjectDelete("time_vv2");
      ObjectDelete("time_sr1");
      ObjectDelete("time_sr2");
    }
    
    void ShowOrders(int mode=MODE_TRADES)
    {
      int i=0; string tmp=""; color clr2=0,clr1=Blue; string prefix="time_order_trades_"; int total=0;
      double CT, CP;
      
      if(mode==MODE_TRADES) {prefix="time_order_trades_";total=OrdersTotal();}
      if(mode==MODE_HISTORY) {prefix="time_order_hist_";total=OrdersHistoryTotal();}
      
      //<--- ????????? ??????
      // ??????? ?????? ?????
      for(i=0;i<total+15;i++)
      {
         tmp=prefix+DoubleToStr(i,0);
         ObjectDelete(tmp);
         ObjectDelete(tmp+"O");
         ObjectDelete(tmp+"C");
         ObjectDelete(tmp+"OA");
         ObjectDelete(tmp+"CA");
         ObjectDelete(tmp+"Cprof1");
         ObjectDelete(tmp+"Cprof2");
      }
      // ????????? ?????
      for(i=0;i<total;i++)
      {
         if(OrderSelect(i,SELECT_BY_POS,mode)==true && OrderSymbol()==Symbol())
         {
            int ot=OrderType();
            if(OrderSymbol()==Symbol() && ((Type==0&&(ot==OP_BUY||ot==OP_SELL)) || (Type==1&&ot==OP_BUY) || (Type==-1&&ot==OP_SELL) ) )
            {
               tmp=prefix+DoubleToStr(i,0);
               clr2=White; if(OrderProfit()>=0) clr2=Lime; else clr2=Red;
               if(OrderType()==OP_BUY) {CP=Bid;clr1=Lime;}
               if(OrderType()==OP_SELL) {CP=Ask;clr1=Red;}
               if(mode==MODE_TRADES)  {CT=Time[0];}
               if(mode==MODE_HISTORY) {CT=OrderCloseTime();CP=OrderClosePrice();}
               
               ObjectCreate(tmp, OBJ_TREND, 0, OrderOpenTime(), OrderOpenPrice(), CT, CP);
               ObjectSet(tmp, OBJPROP_COLOR, clr2);
               ObjectSet(tmp, OBJPROP_RAY, 0);
               ObjectSet(tmp, OBJPROP_WIDTH,1);
               ObjectSet(tmp, OBJPROP_STYLE, STYLE_DASHDOTDOT);
               
               ObjectCreate(tmp+"OA", OBJ_ARROW, 0, OrderOpenTime()/*-Period()*60*/, OrderOpenPrice());
               ObjectSet(tmp+"OA", OBJPROP_COLOR, clr1);
               ObjectSet(tmp+"OA", OBJPROP_ARROWCODE, 1);
               
               /*if(mode==MODE_TRADES) 
               {
                  ObjectCreate(tmp+"O", OBJ_ARROW, 0, OrderOpenTime()-Period()*60, OrderOpenPrice());
                  ObjectSet(tmp+"O", OBJPROP_COLOR, clr1);
                  ObjectSet(tmp+"O", OBJPROP_WIDTH, lblSize);
                  ObjectSet(tmp+"O", OBJPROP_ARROWCODE, 5);
               }*/
    
               if(mode==MODE_HISTORY && ShowProfits) 
               {
                  int j=0, sh=iBarShift(Symbol(),0,CT,true);
                  double pr=0;
                  
                  if(ShiftProfits>=0) for(j=4;j>=0;j--) pr=MathMax(pr,iHigh(Symbol(),0,sh+j));
                  if(ShiftProfits<0) for(j=4;j>=0;j--) pr=MathMax(pr,iLow(Symbol(),0,sh+j));
                  
                  if(ShiftProfits!=0)
                     ObjectCreate(tmp+"Cprof2", OBJ_TEXT, 0, CT, pr+ShiftProfits*Point);
    
                  if(ShiftProfits==0)
                     ObjectCreate(tmp+"Cprof2", OBJ_TEXT, 0, CT, pr+(WindowPriceMax()-WindowPriceMin())/10);
    
                  string sss=""; color clrProf=Lime;
                  if(OrderProfit()>0) { sss="+"; clrProf=Lime;}
                  if(OrderProfit()<0) { sss="-"; clrProf=Red;}
                  
                  ObjectSetText(tmp+"Cprof2", sss+DoubleToStr(MathAbs(OrderClosePrice()-OrderOpenPrice())/Point,0)+"($"+DoubleToStr(MathAbs(OrderProfit()),0)+")",10,"Arial",clrProf);
                  ObjectSet(tmp+"Cprof2", OBJPROP_ANGLE,90);
               }
               ObjectCreate(tmp+"CA", OBJ_ARROW, 0, CT/*+Period()*60*/, CP);
               ObjectSet(tmp+"CA", OBJPROP_COLOR, clr2);
               ObjectSet(tmp+"CA", OBJPROP_ARROWCODE, 3);
               /*if(mode==MODE_TRADES) 
               {
                  
                  ObjectCreate(tmp+"C", OBJ_ARROW, 0, CT+Period()*60, CP);
                  ObjectSet(tmp+"C", OBJPROP_COLOR, clr2);
                  ObjectSet(tmp+"C", OBJPROP_WIDTH, lblSize);
                  ObjectSet(tmp+"C", OBJPROP_ARROWCODE, 6);
               }*/
            }
         }
      }
      //---????????? ??????>
    }
    
    
    void fShowTargets()
    {
      int      i=0, prof_pts=0, ticket=0; 
      double   dist_stop_pts, dist_stop;
      double   dist_take_pts, dist_take;
      double   pr=(Ask+Bid)/2, prof=0;
      datetime CT=Time[0]+Period()*60*(WindowBarsPerChart()/20+2); // time shift
      double   CP=5*Point; // price shift
      int      FS=10; // font size
      color    prof_clr=Blue;
      string   txt="";
      //-------------------------------------------------------------
      for(i=0;i<10;i++)
      {
         ObjectDelete(Symbol()+DoubleToStr(Period(),0)+"vopen"+i);
         ObjectDelete(Symbol()+DoubleToStr(Period(),0)+"vtake"+i);
         ObjectDelete(Symbol()+DoubleToStr(Period(),0)+"vstop"+i);
      }
      for(i=0;i<OrdersTotal();i++)
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
      {
         // <---???????
         RefreshRates();
         prof=OrderProfit();
         if(OrderType()==OP_BUY || OrderType()==3 || OrderType()==4) 
         {
            pr=Bid;
            prof_pts=pr/Point-OrderOpenPrice()/Point;
         }
         if(OrderType()==OP_SELL || OrderType()==2 || OrderType()==5)
         {
            pr=Ask;
            prof_pts=OrderOpenPrice()/Point-pr/Point;
         }
         prof_clr=Blue;
         if(prof_pts<0) prof_clr=Red;
         if(prof_pts>0) prof_clr=Green;
         txt="";
         if(OrderType()==0 || OrderType()==1) txt=" ($"+DoubleToStr(MathAbs(prof),2)+")";
         ObjectCreate(Symbol()+DoubleToStr(Period(),0)+"vopen"+i,OBJ_TEXT,0,CT,OrderOpenPrice()+CP);
         ObjectSetText(Symbol()+DoubleToStr(Period(),0)+"vopen"+i,DoubleToStr(MathAbs(prof_pts),0)+txt,FS,"Arial",prof_clr);
    
         dist_take_pts=0;dist_take=0;
         if(OrderTakeProfit()!=0) 
         {
            dist_take_pts=MathAbs(pr/Point-OrderTakeProfit()/Point);
            txt=DoubleToStr(dist_take_pts,0);
            dist_take_pts=MathAbs(OrderOpenPrice()/Point-OrderTakeProfit()/Point);
            txt=txt+"("+DoubleToStr(dist_take_pts,0)+"/$"+DoubleToStr(dist_take_pts*OrderLots(),2)+")";
            
            ObjectCreate(Symbol()+DoubleToStr(Period(),0)+"vtake"+i,OBJ_TEXT,0,CT,OrderTakeProfit()+CP);
            ObjectSetText(Symbol()+DoubleToStr(Period(),0)+"vtake"+i,txt,FS,"Arial",Green);
         }
         
         dist_stop_pts=0;dist_stop=0;
         if(OrderStopLoss()!=0)
         {
            dist_stop_pts=MathAbs(pr/Point-OrderStopLoss()/Point);
            txt=DoubleToStr(dist_stop_pts,0);
            dist_stop_pts=MathAbs(OrderOpenPrice()/Point-OrderStopLoss()/Point);
            txt=txt+"("+DoubleToStr(dist_stop_pts,0)+"/$"+DoubleToStr(dist_stop_pts*OrderLots(),2)+")";
    
            ObjectCreate(Symbol()+DoubleToStr(Period(),0)+"vstop"+i,OBJ_TEXT,0,CT,OrderStopLoss()+CP);
            ObjectSetText(Symbol()+DoubleToStr(Period(),0)+"vstop"+i,txt,FS,"Arial",Red);
         }
         // ??????--->
      }
    }

     

    Regards,

  2. Looking for traders

     

    Are you a successful trader earning consistent returns from the market? Are you interested in diversifying your income stream while helping other traders succeed? If the answer is YES, we are looking for you!

     

    We are seeking quality Forex traders with the right skillset and results to spearhead our managed accounts initiative. This opportunity is open to professional and new talent alike. Earning potential is unlimited.

     

    If you are interested in this ground level opportunity please consider the following requirements:

     

    1. Real money trading account

    2. At least $5,000 in personal funds

    3. Myfxbook fully verified trade record

    4. At least 6-months of track record

    5. At least 200 executed trades

    6. Fully documented strategy, risk, and money management

    7. Automated or Manual traders

    8. Average trade holding no more than 1 week and no less than 5 minutes

     

    If this opportunity interests you please send me a private message. I will respond within 24 hours with further instructions.

     

    Cheers,

     

    Forex Trader

     

    p.s. if this post violates any forum rules kindly let me know and i will be happy to remove it.

  3. Yes, it's non educated. I have no clue how to educate things.

     

    I found the manual and videos to be very helpful especial the two that explain how the indicator works ( I think 8 part series) and the one about the tips and tricks. I also found the recorded webinars helpful.

     

    Hope this helps

  4. We don't accuse you FX Trader but there can be a hidden virus even you don't see. Is there some manual how to use it and what TFs and pairs?

    Thanks Hermes

    THAT'S A TYPO POST!

    We all don't have a 610 build but only build 600 for now and v1.7.1 is made for the future B610.

    Hermes

     

    I think it will work on 600, 604 and 610 but can't tell cause i have 610.

     

    The manual is included in the zip file and there are some tutorial videos in the members area at the site. Hope this helps.

  5. Let's consider posting that you are using humor to prevent others from replying back as they are doing.

     

    Thanks my friend

     

    Indeed! Looks can be deceiving and that is what am trying to let people see. Don't get sucked into the Aerospace mumbo jumbo. All you need is a good management plan, a solid discipline and a mediocre strategy and you will be well on your way to riches.

  6. How does this work? Do we have to install guardian software in order for this to work and if so how long will it work after that?

     

    Yes, from what I determined is that you need to run guardian software for the indicator to work. I've been testing it for about a week now.

  7. Good stuff!

     

    Here is a screenshot of today's and yesterday's market action while price master pro applied (15 min chart). I had the MTF feature enabled. considering these levels where plotted before market action taking place, it looks pretty accurate.

     

    With MTF feature enabled you have a greater chance of catching most (if not all) major turning price levels.

     

    Anybody else use this tool? can you share with us your experience?

     

    http://postimage.org/image/1nycv9sh0

  8. here is price master pro indicator set 1.04.......but need edu..

     

    http://[email protected]/1JQK7U5AO9

     

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

     

    here is price master pro indicator set 1.07.......but need edu..

     

    http://[email protected]/T1AQUJN8LY

     

    please educate seniors ....

     

    thanks and regards

    niftymover

     

    Alert: Version 1.07 will not work unless you follow the installation instructions outlined at the site (you need to download additional software). Learned this the hard way!

×
×
  • Create New...