You didn't post a topic yet. Let us show you how to make your first topic and upload your favorite forex robot. Guide me

Skip to forum content

 

The latest topics with attached files (Forex robots, Forex Indicators, etc..)

Forums in this category with details of Replies, Views, last post

Forex Shark

by jp1974jp

ForexStream

by jp1974jp

theo fx

by dduu2261


Search options asaa as a as as a s (Page 5 of 207)

Log-In or Register to get unlimited download access of Forex Robots!

Login with Facebook!

Login with Facebook

Login with Username and Password!

     Username:       Password:  Login

Register  |  Forgot Password?

 

Robot → ► MT4talk.com → Search results

Pages Previous 1 2 3 4 5 6 7 207 Next

Perform new search

Posts found: 41 to 50 of 2,065

Good friends, who share this EA called Simplecalp, which works in 15 minutes time, I worked, you can also see that at certain levels of opening operations begins to "Martingalear" opening operations with large lot to compensate, I hope I you like it.   

-
--
The strategy of Assar Elite Pro Forex Scalper V10/V11/V9/V8 is scalping on tic-basis, where the EA opens BUYSTOP or SELLSTOP orders when price breakouts occurs based on the indicator. The indicator is either two “Moving Averages”, “Bollinger Band” or “Envelopes” for the last 3 minutes. Any of the indicators can be used as decided from the external settings. These settings you will find in the mql4 file you received when you first purchased ASSARV10 or downloaded ASSARV11.



Download ASSAR V8, ASSAR V9 and ASSAR V11 here:

Copy and paste this link into your browser address bar

https://goo.gl/Avkbfu









This forum is for trading with live accounts and discussing only ASSAR.



https://mt4talk.com/img/m/9195/5a8a3954671540.79865268.png





“UseIndicatorSwitch”

For all indicators, “a channel” is calculated. And how wide this channel will be is decided by "VolatilityLimit" in points, which by default is calculated and adjusted dynamically, but also can be set to a fix value. If dynamic, it calculates this value as a multiplication of the average spread during the last 30 tics, and the value of the "VolatilityMultiplier".

How much the breakout should be in percentage of the band-width is set by "VolatilityPercentageLimit" in percentage of the channel width.



Volatility Settings: (You can find these settings inside of your mql4 file)

This is actually a part of the trading settings, but covers more specific settings for how the scalping should be done.

VolatilityMultiplier / 10 * RealAverageSpread, where “VolatilityMultiplier” is set as below, and “RealAverageSpread” is the average value of the spread during the last 30 tics + any broker commission. So for instance, if the spread is 16 (1.6 pip) and commission is 0, then “VolatilityLimit” will be 200 points (or 20 pips), since 125 / 10 * 16 = 200.



VolatilityMultiplier: A multiplication factor to be used if the above “UseDynamicVolatilityLimit” is set to TRUE. Default 125. Before you change this, please make sure that you make some calculations according to the formula above based on different spreads so that you fully understand how this value changes.



VolatilityLimit: This sets the sensitivity for when trading will start, based on the size of the volatility (how much the prices has moved). It’s the distance in points between the highest price (known as iHigh) and lowest price (known as iLow) during the current bar. If the price moves more than this, an order will be opened in the opposite direction. If you set this level to too high, there will be fewer trades, but it could also increase the winning rate. If it’s too low, it will start to trade more often, but the winning rate could decrease. Note: This is one of the most important parameters to change if you want to adjust the robot for any other currency pair than EURUSD and don’t want to use “UseDynamicVolatility-Limit”. It can be as low as 50 (or even lower) or as high as 500 (or even higher). A value around 180 (18 pips) seem to be a good average.



UseVolatilityPercentage: Normally the Volatiliity (the difference between iHigh and iLow during the current bar) must be more than the VolatilityLimit in order to trigger a trade, disregarding of how much the VolatilityLimit is. If this is set to be TRUE, then this difference must exceed with a minimum percentage known as “VolatilityPercentageLimit” (see below). For instance, if “VolatilityPercentageLimit” is set to 60, then the Volatility must exceed the “VolatilityLimit” with at least 60%. So if VolatilityLimit is 180 then the Volatility (the difference between iHigh and iLow) must be 180 * 1.6 = 288 points.



VolatilityPercentageLimit: A factor used if the above “UseVolatility-Percetage” is set to TRUE, and measured as percentage. For instance, 60 means 60%. Otherwise not used. Set this to a whole value representing how many percentage more you want this to be (see explanation above under “UseVolatilityPercentage”). The higher the value, the fewer trades but most likely also stronger signals.



Only one order is opened at a time, and an opened BUYSTOP / BUYSELL order is treated differently from an opened BUY / SELL orders as follows:

An open BUY-order is modified with a new StopLoss (SL) and TakeProfit (TP) if its current “TakeProfit” is less than the “current Ask price” + “Commission” + “TakeProfit” + “AddPriceGap” AND “current Ask price” + “Commission” + “TakeProfit” + “AddPriceGap” – “existing TakeProfit” is larger than the “TrailingStart”.

An open SELL-order is in a similar way modified with a new SL and TP if its “current TakeProfit” is greater than “current Bid-price” - “Commission”

“TakeProfit” – “AddPriceGap” AND “current TakeProfit” – “current Bid-price” – “Commission” + “TakeProfit” – “AddPriceGap” is larger than the “TrailingStart”.

The SL for the modified BUY-order is changed to “current Bid-price” – “StopLoss” – “AddPriceGap”, and the TP to the “current Ask-price” + “Commission” + “TakeProfit” + “AddPriceGap”.

And for the modified SELL-order, the SL is changed to “current Ask-price”

“StopLoss” + “AddPriceGap”, and TP to “current Bid-price” – “Commission” – “TakeProfit” – “AddPriceGap”.

Open BUYSTOP and SELLSTOP orders are either modified or deleted. They are modified with new SL and TP as follows.

An open BUYSTOP order is modified if the “current Ask-price” + “StopLevel” + “AddPriceGap” is less than the “OrderOpenPrice” AND the “OrderOpenPrice” – “current Ask-price” + “StopLevel” + “AddPriceGap” is greater than “TrailingStart”.

An open SELLSTOP is modified with new SL and TP if “current Bid-price” – “StopLevel” – “AddPriceGap” is greater than “OrderOpenPrice“ AND “current Bid-price” – “StopLevel” - “AddPriceGap” – “OrderOpenPrice“ is greater than “TrailingStart”.




If the conditions are not met for the BUYSTOP or SELLSTOP order, then they are deleted.




https://mt4talk.com/img/m/9195/5a8a36860abb13.20296878.png





https://mt4talk.com/img/m/9195/5a8a3a30435921.92600547.png




The Official ASSAR Website:


Cheers!

xperya wrote:

hello Guys,

Last year in just 1 months I made over $20,000 with this robot.
 The default setting was not working good for me so I did playing with the settings for a long time and I back test and I did demo for a long time and I was lucky to find a good settings. Started trading with $500 deposit on live account and I did withdraw my profit once a week and started again with $500. It had many bigger losing trades but so many small winning trades. And I ended up in over $20,000 profit in just 1 month. And after I had a bad week and I did stooped using it. Now I want to use again but I cannot find my setting files. I think I deleted by mistake.

My question is any one using this  or used this ea before and have any good setting files?

Let me try to find a profitable setting for you in tester, but has it expired already?
Update: sorry can't find!!

I just found this old robot Forex Robot on my hard drive.  
Please back-test it and try to find a good settings for it if is any...
Good luck with it.

Now im using this robot its good but not a big profit but many small profit every day. 
Im using on FBS broker with leverage 1:3000. I started with $500 deposit and its earning for me an average $20 - $25 per day. Which is still very good i think smile  I thinking to deposit more like $10,000 or $20,000 and trade much bigger lot sizes but I'm a little afraid of what is something goes wrong?

hello Guys,

Last year in just 1 months I made over $20,000 with this robot.
 The default setting was not working good for me so I did playing with the settings for a long time and I back test and I did demo for a long time and I was lucky to find a good settings. Started trading with $500 deposit on live account and I did withdraw my profit once a week and started again with $500. It had many bigger losing trades but so many small winning trades. And I ended up in over $20,000 profit in just 1 month. And after I had a bad week and I did stooped using it. Now I want to use again but I cannot find my setting files. I think I deleted by mistake.

My question is any one using this  or used this ea before and have any good setting files?

shaneleefoster wrote:

Not my robot, ran across it on another forum, but works really well if spread is really low.  Scalps the market like crazy

What are settings, Time Frame & Pairs? nothing clear here. Kindly provide all possible details So, We can use it properly. thanks

Martingale  X2 hedge robot with new edition modifications for mt4

//+------------------------------------------------------------------+
//                        DO NOT DELETE THIS HEADER
//             DELETING THIS HEADER IS COPYRIGHT INFRIGMENT 
//
//                   Copyright ©2017, https://mt4talk.com
//                     MT4talk Expert Advisor Generator
//                        https://mt4talk.com/eagenerator/
//
// THIS EXPERT ADVISOR (EA) HAS BEEN GENERATED USING MT4talk EA GENERATOR. 
// 
// Disclaimer: This EA is provided to you "AS-IS", and MT4talk disclaims any warranty
// or liability obligations to you of any kind. 
//
// FREE EA LICENSE
// This EA is provided to you for free of charge! You can share this EA on any website or any forums. 
//
// CFTC RULE 4.41
// HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED 
// RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-
// OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY. SIMULATED TRADING PROGRAMS, 
// IN GENERAL, ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING 
// MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN.
//
// U.S. Government Required Disclaimer.
// Commodity Futures Trading Commission Futures and Options trading has large potential rewards, but also large potential risk. 
// You must be aware the risks and be willing to accept them in order to invest in the futures and options markets. 
// Don't trade with money you can't afford to lose. This is neither a solicitation nor an offer to Buy/Sell futures or options.
// No representation is being made that any account will or is likely to achieve profits or losses similar 
// to those discussed on this website. The past performance of any trading system or methodology is not necessarily 
// indicative of future results.
//
// USE THIS EA AT YOUR OWN RISK. 
//
//                      DO NOT DELETE THIS HEADER
//             DELETING THIS HEADER IS COPYRIGHT INFRIGMENT 
//+------------------------------------------------------------------+

#property copyright "Copyright 2017"
#property link      "https://mt4talk.com"
#property version   "1.00"
#property strict
extern double Lotsize=0.1;
extern double Stop_Loss=5;
extern double Take_Profit=4;
extern double Trailing_Stop=3;
extern int Magic_Number=12345;
extern int Max_Nr_Of_Trades=4;
extern int Max_Nr_Of_Sell_Trades=2;
extern int Max_Nr_Of_Buy_Trades=1;
extern bool Hidden=false;
extern int Martingale_Type=0;
extern bool Close_opposit_signal=true; 
extern bool DayFilter=false; 
extern bool TimeFilter=false;
 
double Risk=0;

double Martingale_Value=0;

bool FixSL=0;
int Money_Management=0;

int cntmartin=0;
double ts=0;
double be=0;
double sl,tp;
int mp;
datetime lasttrade;


 

 

int OnInit() 
 
{ 
    mp=1;
    if (Digits==5 || Digits==3) mp=10; 
    lasttrade=TimeCurrent();
    cntmartin=0;
    
    if (Money_Management==1)   
    {
       Stop_Loss=Stop_Loss/MarketInfo(Symbol(),MODE_TICKVALUE)/mp/Lotsize;
       Take_Profit=Take_Profit/MarketInfo(Symbol(),MODE_TICKVALUE)/mp/Lotsize;
       Break_Even=Break_Even/MarketInfo(Symbol(),MODE_TICKVALUE)/mp/Lotsize;
       Trailing_Stop=Trailing_Stop/MarketInfo(Symbol(),MODE_TICKVALUE)/mp/Lotsize;
    }

    //---
    return(INIT_SUCCEEDED);

} 

 
void OnDeinit(const int reason)
 
{} 

 
void OnTick()
{
    bool TradeAllow=false;
    bool buy_signal=false;
    bool sell_signal=false;
    double sl;
    double tp;
    double lotsize;
    
 
    buy_signal=GetSignal(OP_BUY);
    sell_signal=GetSignal(OP_SELL);
 
    //---       
    if((CloseSignal(OP_BUY)) ||
        (sell_signal && Close_opposit_signal))
    {
      CloseOrders(OP_BUY);
    }
    if((CloseSignal(OP_SELL)) ||
        (buy_signal && Close_opposit_signal))
    {
      CloseOrders(OP_SELL);
    }
 
    if((Max_Nr_Of_Trades>0 && GetNrOfTrades(6)<Max_Nr_Of_Trades)||
        Max_Nr_Of_Trades==0)
    {
        if((Max_Nr_Of_Buy_Trades>0 && GetNrOfTrades(OP_BUY)<Max_Nr_Of_Trades)||
            Max_Nr_Of_Trades==0)
        {
            if(buy_signal)
            {
                if (Money_Management==2)
                {
                    double entry;
        
                    entry=MarketInfo(Symbol(),MODE_ASK);
                    if(FixSL)
                    {    
                        sl=NormalizeDouble(entry-Stop_Loss*mp*Point(),(int)MarketInfo(Symbol(),MODE_DIGITS));     
                        Lotsize=NormalizeDouble(CalcLotsize(Symbol(),entry,sl,Risk),2);
                        tp=NormalizeDouble(entry+CalcDistance(Take_Profit,Lotsize)*mp*Point(),(int)MarketInfo(Symbol(),MODE_DIGITS)); 
                    }
                    else
                    {
                        sl=NormalizeDouble(entry-CalcDistance(Stop_Loss,Lotsize)*mp*Point(),(int)MarketInfo(Symbol(),MODE_DIGITS));     
                        tp=NormalizeDouble(entry+CalcDistance(Take_Profit,Lotsize)*mp*Point(),(int)MarketInfo(Symbol(),MODE_DIGITS)); 
                    }
                    
                }
                   
                   
                if (GetLastProfit(lotsize)<0 && Martingale_Type>0)
                {
                    Lotsize=lotsize;
                    cntmartin++;
                }
                else
                {
                    cntmartin=0;
                }
                  
                if (Martingale_Type==1)//Increment
                {
                    Lotsize+=Martingale_Value;
                }
                        
                if (Martingale_Type==2)//Multipli
                {
                     Lotsize*=Martingale_Value;
                }
                OpenOrder(OP_BUY);
            }
        }
        if((Max_Nr_Of_Sell_Trades>0 && GetNrOfTrades(OP_SELL)<Max_Nr_Of_Sell_Trades)||
            Max_Nr_Of_Sell_Trades==0)
        {
            if(sell_signal)
            {
                if (Money_Management==2)
                {
                    double entry;
                    entry=MarketInfo(Symbol(),MODE_BID);
                    if(FixSL)
                    {
                        sl=NormalizeDouble(entry+Stop_Loss*mp*Point(),(int)MarketInfo(Symbol(),MODE_DIGITS));
                        Lotsize=NormalizeDouble(CalcLotsize(Symbol(),entry,sl,Risk),2);
                        tp=NormalizeDouble(entry-CalcDistance(Take_Profit,Lotsize)*mp*Point(),(int)MarketInfo(Symbol(),MODE_DIGITS)); 
                    }
                    else
                    {
                        sl=NormalizeDouble(entry+CalcDistance(Stop_Loss,Lotsize)*mp*Point(),(int)MarketInfo(Symbol(),MODE_DIGITS));     
                        tp=NormalizeDouble(entry-CalcDistance(Take_Profit,Lotsize)*mp*Point(),(int)MarketInfo(Symbol(),MODE_DIGITS)); 
                    }
                }
                
                
                if (GetLastProfit(lotsize)<0 && Martingale_Type>0)
                {
                    Lotsize=lotsize;
                    cntmartin++;
                }
                else
                {
                    cntmartin=0;
                }
                  
                if (Martingale_Type==1)//Increment
                {
                    Lotsize+=Martingale_Value;
                }
                        
                if (Martingale_Type==2)//Multipli
                {
                     Lotsize*=Martingale_Value;
                }
                OpenOrder(OP_SELL);
            }
        }
    }
}
       
 
 
bool GetSignal(int type)
{
    bool b=false;
     
 
    if(type==OP_BUY)
    {
 
            if(iOpen(Symbol(),1,0)>iClose(Symbol(),5,0))
            {
               b=true;
            }
        } 
 
    if(type==OP_SELL)
    {
            if(iOpen(Symbol(),0,0)>iClose(Symbol(),5,0))
            {
               b=true;
            }
        } 
 
    return(b);
} 
 
bool CloseSignal(int type)
{
    bool b=false;
     
 
    if(type==OP_BUY)
    {
            if(iClose(Symbol(),5,0)<iHigh(Symbol(),5,0))
            {
               b=true;
            }
        } 
 
    if(type==OP_SELL)
    {
            if(iClose(Symbol(),5,0)>iHigh(Symbol(),5,0))
            {
               b=true;
            }
        } 
 
    return(b);
}
 
void OpenOrder(int type)
{
   int ticket=-1;
   int err=0;
  
    if(type==OP_BUY)
    {
        ticket = OrderSend(Symbol(), OP_BUY, Lotsize, MarketInfo(Symbol(), MODE_ASK), 10, 0, 0,"", Magic_Number);       
        if(ticket<0)
        {
            err=GetLastError();
            //Print ('Error!. Cannot Open BUY, failed with error : ',err);
        }
        else
        {
            if(Money_Management<2)
            {
                sl=NormalizeDouble(MarketInfo(Symbol(), MODE_ASK)-Stop_Loss*mp*MarketInfo(Symbol(),MODE_POINT), MarketInfo(Symbol(),MODE_DIGITS));
                tp=NormalizeDouble(MarketInfo(Symbol(), MODE_ASK)+Take_Profit*mp*MarketInfo(Symbol(),MODE_POINT), MarketInfo(Symbol(),MODE_DIGITS));
            }
            OrderModify(ticket, MarketInfo(Symbol(), MODE_ASK), sl, tp,0);//open price=MarketInfo(Symbol(), MODE_ASK)
        }
    }

    if(type==OP_SELL)
    {
        ticket = OrderSend(Symbol(), OP_BUY, Lotsize, MarketInfo(Symbol(), MODE_BID), 10, 0, 0,"", Magic_Number);       
        if(ticket<0)
        {
            err=GetLastError();
            //Print ('Error!. Cannot Open BUY, failed with error : ',err);
        }
        else
        {
            if(Money_Management<2)
            {
                sl=NormalizeDouble(MarketInfo(Symbol(), MODE_BID)+Stop_Loss*mp*MarketInfo(Symbol(),MODE_POINT), MarketInfo(Symbol(),MODE_DIGITS));
                tp=NormalizeDouble(MarketInfo(Symbol(), MODE_BID)-Take_Profit*mp*MarketInfo(Symbol(),MODE_POINT), MarketInfo(Symbol(),MODE_DIGITS));
            }
            OrderModify(ticket, MarketInfo(Symbol(), MODE_BID), sl, tp,0);//open price=MarketInfo(Symbol(), MODE_ASK)
        }
    }
}
 
void CloseOrders(int type)
{
   int total  = OrdersTotal();
   for (int i = total-1 ; i >=0 ; i--)
   {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES) && 
        OrderMagicNumber() == Magic_Number && 
        OrderSymbol() == Symbol() && 
        type==OrderType()) 
        {
            switch(OrderType())
            {
                case OP_BUY:
                {
                    OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_BID),10);
                    break;  
                }
                                  
                case OP_SELL:
                {
                    OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_ASK),10);
                    break;
                }
            }             
        }
    }
}
 
bool IsNewBar()
{
    if (lasttrade<iTime(Symbol(),0,0))
    {
        lasttrade=iTime(Symbol(),0,0);
        return (true);
    }
    return (false);
}
int GetNrOfTrades(int type)
{
   int t=0;
   
   int total = OrdersTotal();
   int count;
   if(type==OP_BUY || type==OP_SELL)
   {
       for(count = total - 1; count >= 0; count--)
       {
          if(!OrderSelect(count, SELECT_BY_POS, MODE_TRADES)) continue;
          if (OrderSymbol()==Symbol() && OrderMagicNumber()==Magic_Number && OrderType()==type)
          {
             t++;
          }
       }
       return (t);
   }
   else if(type==6)
   {
       for(count = total - 1; count >= 0; count--)
       {
          if(!OrderSelect(count, SELECT_BY_POS, MODE_TRADES)) continue;
          if (OrderSymbol()==Symbol() && OrderMagicNumber()==Magic_Number)
          {
             t++;
          }
       }
       return (t);
   }
   return(t);
}
    
 
double CalcLotsize(string symbol,double entry, double sl,double risk)
{
   
   double qty,riskm,dist; 
   dist=MathAbs(entry-sl)/MarketInfo(symbol,MODE_POINT);
   riskm=AccountBalance()*risk/100;
   
   qty=riskm/(dist*MarketInfo(symbol,MODE_TICKVALUE));  
   return( NormalizeDouble(qty,2) );
}
    
 
void Trailing(double Trailing_Stop)
{
  int err;
   double sl = 0;
   bool result;
   
   //
   sl = OrderStopLoss();
   if(OrderType() == OP_BUY)
   {
      if((MarketInfo(Symbol(),MODE_BID) > (OrderOpenPrice() + Trailing_Stop*mp*MarketInfo(Symbol(),MODE_POINT))) )
      {                        
         
         if(OrderStopLoss() == 0) sl = MarketInfo(Symbol(),MODE_BID) - Trailing_Stop*mp*MarketInfo(Symbol(),MODE_POINT);
         if(OrderStopLoss() != 0 && MarketInfo(Symbol(),MODE_BID) >= OrderStopLoss() + Trailing_Stop*mp*MarketInfo(Symbol(),MODE_POINT)) sl = MarketInfo(Symbol(),MODE_BID) - Trailing_Stop*mp*MarketInfo(Symbol(),MODE_POINT);
         while(IsTradeContextBusy()) Sleep(100);
         if(sl > OrderStopLoss())
         {
            ResetLastError();
            result = OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(sl, MarketInfo(Symbol(),MODE_DIGITS)), OrderTakeProfit(), 0, CLR_NONE);
            //
            if (result)
            {               
               Print("Trailing Stop updated: #", OrderTicket(), "; SL = ", DoubleToStr(OrderStopLoss(), MarketInfo(Symbol(),MODE_DIGITS)), "; Bid = ", DoubleToStr(MarketInfo(Symbol(),MODE_BID), MarketInfo(Symbol(),MODE_DIGITS)));
            }
            else
            {
               err = GetLastError();
               Print("Error!. Trailing Stop #", OrderTicket(), " order modify failed with error(",err,")");
            }
         }
      }
   }//if(OrderType() == OP_BUY)
   //
   if(OrderType() == OP_SELL)
   {
      
      if((MarketInfo(Symbol(),MODE_ASK) < (OrderOpenPrice() - Trailing_Stop*mp*MarketInfo(Symbol(),MODE_POINT))))
      {
         
         if(OrderStopLoss() == 0) sl = MarketInfo(Symbol(),MODE_ASK) + (Trailing_Stop*mp)*MarketInfo(Symbol(),MODE_POINT);
         if(OrderStopLoss() != 0 && MarketInfo(Symbol(),MODE_ASK) <= OrderStopLoss() - Trailing_Stop*mp*MarketInfo(Symbol(),MODE_POINT)) sl = MarketInfo(Symbol(),MODE_ASK) + (Trailing_Stop*mp)*MarketInfo(Symbol(),MODE_POINT);
         while(IsTradeContextBusy()) Sleep(100);
         if(sl < OrderStopLoss())
         {
            ResetLastError();
            result = OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(sl, MarketInfo(Symbol(),MODE_DIGITS)), OrderTakeProfit(), 0, CLR_NONE);
            //
            if (result)
            {
               Print("Trailing Stop updated: #", OrderTicket(), "; SL = ", DoubleToStr(sl, MarketInfo(Symbol(),MODE_DIGITS)), "; Ask = ", DoubleToStr(MarketInfo(Symbol(),MODE_ASK), MarketInfo(Symbol(),MODE_DIGITS)));
            }
            else
            {
               err = GetLastError();
               Print("Error!. Trailing Stop #", OrderTicket(), " order modify failed with error(",err,")");
            }
         }
      }
   }
}
    
 
void ManageTrades()
{
   int t=OrdersTotal();
   for(int i=t-1;i>=0;i--)
   {
      if(OrderSelect(i,SELECT_BY_POS))
      {
         if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic_Number)
         {
            if (!Hidden)
            {
                if (Money_Management==2)
                {
                    ts=CalcDistance(Trailing_Stop,OrderLots());//OrderLots
                    be=CalcDistance(Break_Even,OrderLots()); 
                }
                else
                {
                    ts=Trailing_Stop;
                    be=Break_Even;
                }
                
                if (Break_Even>0)
                {
                    BreakEven(be);
                }
                if (Trailing_Stop>0)
                {
                    Trailing(ts);
                }
            }
           
         
         }
      }
   }//for end
}
    
 
    
void BreakEven(double Break_Even)
{
   bool result;
   double sl;
   int err;
   //
   ResetLastError();
   if(OrderType() == OP_BUY)
   {
       if(OrderStopLoss() >= OrderOpenPrice()) return;
       
       if (MarketInfo(Symbol(),MODE_BID) >= OrderOpenPrice() + Break_Even*mp*MarketInfo(Symbol(),MODE_POINT))
       {
         sl= OrderOpenPrice() ;
         while(IsTradeContextBusy()) Sleep(100);
         result = OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(sl, MarketInfo(Symbol(),MODE_DIGITS)), OrderTakeProfit(), 0, CLR_NONE);
         if (result)
         {
            Print("Break Even stop updated: #", OrderTicket(), "; SL = ", DoubleToStr(sl, MarketInfo(Symbol(),MODE_DIGITS)), "; Bid = ", DoubleToStr(MarketInfo(Symbol(),MODE_BID), MarketInfo(Symbol(),MODE_DIGITS)));
         }
         else
         {
            err = GetLastError();
            Print("Error!. Break Even #", OrderTicket(), " order modify failed with error(",err,")");
         }
       }
   }
   //
   if (OrderType() == OP_SELL) 
   {
       if (OrderStopLoss() <= OrderOpenPrice() && OrderStopLoss() != 0) return;
       
       if (MarketInfo(Symbol(),MODE_ASK) <= OrderOpenPrice() - Break_Even*mp*MarketInfo(Symbol(),MODE_POINT))
       {
         sl = OrderOpenPrice() ;
         while(IsTradeContextBusy()) Sleep(100);
         result = OrderModify(OrderTicket(),OrderOpenPrice(), NormalizeDouble(sl, MarketInfo(Symbol(),MODE_DIGITS)), OrderTakeProfit(), 0, CLR_NONE);
         if (result)
         {           
            Print("Break Even stop updated: # ", OrderTicket(), "; SL = ", DoubleToStr(sl, MarketInfo(Symbol(),MODE_DIGITS)), "; Ask = ", DoubleToStr(MarketInfo(Symbol(),MODE_ASK), MarketInfo(Symbol(),MODE_DIGITS)));
         }
         else
         {
            err = GetLastError();
            Print("Error!. Break Even #", OrderTicket(), " order modify failed with error(",err,")");
         }
       }
   }
}
    
 
double CalcDistance(double risk, double lotsize)
{
   risk=AccountBalance()*risk/100;
   return (risk/MarketInfo(Symbol(),MODE_TICKVALUE)/mp/lotsize);
}

 
double GetLastProfit(double& lotsize)
{
   int t=OrdersTotal();
   double p=0;
   datetime mt=0;
   
   for (int i=t-1;i>=0;i--)
   {
      if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
      {
         if (OrderSymbol()==Symbol() && OrderMagicNumber()==Magic_Number && OrderCloseTime()>mt)
         {
            mt=OrderCloseTime();
            p=OrderProfit();
            lotsize=OrderLots();
         }
      }
   }
   
   return (p);
}

Not my robot, ran across it on another forum, but works really well if spread is really low.  Scalps the market like crazy

This is a martingale EA that break a lot of real acounts, but who want to get the full version, I post here for you do the download

Professional robot forex : http://adbilty.me/cNdZr [dollarupload]
or
http://adbilty.me/62CRs [cleanfiles]

Posts found: 41 to 50 of 2,065

Pages Previous 1 2 3 4 5 6 7 207 Next

Robot → ► MT4talk.com → Search results


NOTE: Cracks or other illegal versions of copyrighted forex robots are highly prohibited on MT4talk.com. If you upload any illegal version of any copyrighted forex robot, your forum account will be banned. No exceptions.


Copyright MT4talk.com Forum Rules - Privacy Policy.