Forex



Go Back   Forex Trading > Trading systems > Phoenix
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #411 (permalink)  
Old 01-17-2008, 12:07 PM
Linuxser's Avatar
User Root
 
Join Date: May 2006
Location: Helliconia (Spring)
Posts: 4,412
Blog Entries: 56
Linuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond repute
Quote:
Originally Posted by Togu View Post
Thanks for the response but the link you gave is incorrect. It just redirects me to the whole Phoenix forum. Can you just tell me what version of Phoenix you using? Will be greatly appreciated.
You could start with this thread or this one is the stable
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #412 (permalink)  
Old 01-17-2008, 04:42 PM
Junior Member
 
Join Date: Jan 2008
Posts: 5
alkhal4 is on a distinguished road
EA version6

Has anyone tried using version 6 of the EA that is present on Phoenix - Development+Suggestions - MQ4 in Post#1

I have downloaded it and it doesn't seem to trade at all!
USDCHF M15 and all setting is as default but no trading

Could someone respond and clarify this issue
Do I need to do any thing to the settings?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #413 (permalink)  
Old 01-26-2008, 04:46 AM
Senior Member
 
Join Date: Jan 2008
Posts: 188
Togu is on a distinguished road
Quote:
Originally Posted by alkhal4 View Post
Has anyone tried using version 6 of the EA that is present on Phoenix - Development+Suggestions - MQ4 in Post#1

I have downloaded it and it doesn't seem to trade at all!
USDCHF M15 and all setting is as default but no trading

Could someone respond and clarify this issue
Do I need to do any thing to the settings?
I have the same problem. but I could run it on Omnivest-Omnivest Trading System but when I tried ODL it doesn't trade at all. With the Omnivest broker it was working. And so far I don't know how Phonenix was performing lately.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #414 (permalink)  
Old 02-03-2008, 02:28 AM
Junior Member
 
Join Date: Dec 2007
Posts: 4
globus2008 is on a distinguished road
Phoenix - bugs

Hello Alkhal4, Togu and all,

The Phoenix 6 Released doesn't work to you because originally extern variable "F_ATR" is set up on value 0.6 and it should be around 0.0001. But then when you run it you will find in a Journal a lot of "Ordermodify errors Nr.130". It is because there are bugs in functions "X1_ManageExit" and "X9_ModifySL". I have found two solutions not to display them :
1) Set up variable E_BE_SL=0 . But then you can not trade break even.
2) Replace these two functions "X1_ManageExit" and "X9_ModifySL" with my scripts in a source mq4 file. See below.

If you want and if you are not able to do it alone, I can send you this EA without these bugs but I don't want to upload EA here because it is in violation of Hendrick's wish -
Quote:
You can the change the code of Phoenix if you want to, but please don’t post it in this thread!
- see first post in Phoenix 2007 (new thread) .

This problem must have also others and I please a man who cares about source code of Phoenix (it was Hendrick, now daraknor ? - I don't know I have red only a couple of messages ) for debugging and putting correct version in the first post.

repared code of function "X1_ManageExit" :
Code:
//**********  Exit Strategies & Trailing Stops **********************************//
void X1_ManageExit(int myticket)
{ //Contains all of the exit strategies and trade management routines. Listed in priority.
    minStop=MarketInfo(Symbol(),MODE_STOPLEVEL); //updated every tick in case of news SL movement
  
    if(E_GraceHours !=0 ||E_ForceHours !=0) 
      X1_ForceClose_or_GraceModify(myticket);
  
    if(E_RecrossMax!=0)
      {
        double price;
          if (OrderType() == OP_BUY)   price=Bid;
          if (OrderType() == OP_SELL)  price=Ask;
          if(Bars>bcRecross)
            { //Bar hasn't been counted yet
              if(OrderOpenPrice()>price-1 && OrderOpenPrice()<price+1)
                {
                  recrosscount++;
                  bcRecross=Bars;

                  if (recrosscount>=E_RecrossMax)
                     if(!OrderClose(myticket,OrderLots(),price,AcceptSlip,Red)) 
                       L4_WriteError();
                }
              }
    
      }
  //TODO StealthExit  
  if(E_BE_SL>0)
  {  //    BreakEven SL @target
    if(E_BE_SL<E_BE_Profit+minStop) E_BE_Profit=E_BE_SL-minStop; //keeps trade safe all of the time
    if (OrderType() == OP_BUY && Bid-OrderOpenPrice()>=Point*E_BE_SL && OrderStopLoss()-Point*E_BE_Profit<OrderOpenPrice() && Bid-OrderOpenPrice()-E_BE_Profit*Point>=minStop*Point)
        X9_ModifySL(OrderOpenPrice()+E_BE_Profit*Point,myticket); 
    if (OrderType() == OP_SELL && OrderOpenPrice()-Ask>=Point*E_BE_SL+MarketInfo(Symbol(),MODE_SPREAD)*Point && OrderStopLoss()+Point*E_BE_Profit+MarketInfo(Symbol(),MODE_SPREAD)*Point>OrderOpenPrice() && OrderOpenPrice()+E_BE_Profit*Point+MarketInfo(Symbol(),MODE_SPREAD)*Point-Ask>=minStop*Point)
        X9_ModifySL(OrderOpenPrice()-E_BE_Profit*Point-MarketInfo(Symbol(),MODE_SPREAD)*Point,myticket); 
  }
repared code of function "X9_ModifySL" :
Code:
bool X9_ModifySL(double sl, int ticket)
  {
    double MoveTP;
    if(E_MoveTPonTS !=0)
    {
      if (OrderType() == OP_SELL) 
      {
        MoveTP=E_MoveTPonTS*(-1)*Point;
        if(Ask-OrderTakeProfit()+MoveTP<minStop*Point && sl-Ask>=minStop*Point) 
          MoveTP=minStop*Point*(-1)+Ask-OrderTakeProfit(); //Set the new distance to minimum safe point, -OTP() cancels OTP() // repared error 4051
      }
      else 
      {
        MoveTP=E_MoveTPonTS*Point;
        if(OrderTakeProfit()-Bid+MoveTP<minStop*Point && Bid-sl>=minStop*Point) 
          MoveTP=minStop*Point-Bid+OrderTakeProfit();  //Set the new distance to minimum safe point, -OTP() cancels OTP()
      }
    }
    
    if(U_WriteDebug) L3_WriteDebug("MODIFY Ticket:"+ticket+" OpenPrice:"+OrderOpenPrice()+" SL:"+sl+" TP:"+(OrderTakeProfit()+MoveTP*Point));
    if(NormalizeDouble(sl/Point,0)==NormalizeDouble(OrderStopLoss()/Point,0)) return(true);  
    if(OrderModify ( ticket, OrderOpenPrice(), sl,
                      OrderTakeProfit()+MoveTP,   
                      0, Red) ==(-1)) 
        return(false);
    else return(true);
  }

Last edited by globus2008; 02-14-2008 at 10:21 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #415 (permalink)  
Old 02-20-2008, 02:27 PM
Junior Member
 
Join Date: Jan 2008
Posts: 1
Behzad2008 is on a distinguished road
Question

Hello to all...

Which version of "Phoenix" is better?

"Hendrik's Phoenix" or "daraknor's Phoenix" ?

please tell me one...thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #416 (permalink)  
Old 02-21-2008, 08:08 PM
Junior Member
 
Join Date: Feb 2008
Posts: 2
yoyo is on a distinguished road
Hello globus2008,

Could you send me a private message, with your "Phoenix 6 Released" running version ?


Thanks,

yoyo


Quote:
Originally Posted by globus2008 View Post
Hello Alkhal4, Togu and all,

The Phoenix 6 Released doesn't work to you because originally extern variable "F_ATR" is set up on value 0.6 and it should be around 0.0001. But then when you run it you will find in a Journal a lot of "Ordermodify errors Nr.130". It is because there are bugs in functions "X1_ManageExit" and "X9_ModifySL". I have found two solutions not to display them :
1) Set up variable E_BE_SL=0 . But then you can not trade break even.
2) Replace these two functions "X1_ManageExit" and "X9_ModifySL" with my scripts in a source mq4 file. See below.

If you want and if you are not able to do it alone, I can send you this EA without these bugs but I don't want to upload EA here because it is in violation of Hendrick's wish - - see first post in Phoenix 2007 (new thread) .

This problem must have also others and I please a man who cares about source code of Phoenix (it was Hendrick, now daraknor ? - I don't know I have red only a couple of messages ) for debugging and putting correct version in the first post.

repared code of function "X1_ManageExit" :
Code:
//**********  Exit Strategies & Trailing Stops **********************************//
void X1_ManageExit(int myticket)
{ //Contains all of the exit strategies and trade management routines. Listed in priority.
    minStop=MarketInfo(Symbol(),MODE_STOPLEVEL); //updated every tick in case of news SL movement
  
    if(E_GraceHours !=0 ||E_ForceHours !=0) 
      X1_ForceClose_or_GraceModify(myticket);
  
    if(E_RecrossMax!=0)
      {
        double price;
          if (OrderType() == OP_BUY)   price=Bid;
          if (OrderType() == OP_SELL)  price=Ask;
          if(Bars>bcRecross)
            { //Bar hasn't been counted yet
              if(OrderOpenPrice()>price-1 && OrderOpenPrice()<price+1)
                {
                  recrosscount++;
                  bcRecross=Bars;

                  if (recrosscount>=E_RecrossMax)
                     if(!OrderClose(myticket,OrderLots(),price,AcceptSlip,Red)) 
                       L4_WriteError();
                }
              }
    
      }
  //TODO StealthExit  
  if(E_BE_SL>0)
  {  //    BreakEven SL @target
    if(E_BE_SL<E_BE_Profit+minStop) E_BE_Profit=E_BE_SL-minStop; //keeps trade safe all of the time
    if (OrderType() == OP_BUY && Bid-OrderOpenPrice()>=Point*E_BE_SL && OrderStopLoss()-Point*E_BE_Profit<OrderOpenPrice() && Bid-OrderOpenPrice()-E_BE_Profit*Point>=minStop*Point)
        X9_ModifySL(OrderOpenPrice()+E_BE_Profit*Point,myticket); 
    if (OrderType() == OP_SELL && OrderOpenPrice()-Ask>=Point*E_BE_SL+MarketInfo(Symbol(),MODE_SPREAD)*Point && OrderStopLoss()+Point*E_BE_Profit+MarketInfo(Symbol(),MODE_SPREAD)*Point>OrderOpenPrice() && OrderOpenPrice()+E_BE_Profit*Point+MarketInfo(Symbol(),MODE_SPREAD)*Point-Ask>=minStop*Point)
        X9_ModifySL(OrderOpenPrice()-E_BE_Profit*Point-MarketInfo(Symbol(),MODE_SPREAD)*Point,myticket); 
  }
repared code of function "X9_ModifySL" :
Code:
bool X9_ModifySL(double sl, int ticket)
  {
    double MoveTP;
    if(E_MoveTPonTS !=0)
    {
      if (OrderType() == OP_SELL) 
      {
        MoveTP=E_MoveTPonTS*(-1)*Point;
        if(Ask-OrderTakeProfit()+MoveTP<minStop*Point && sl-Ask>=minStop*Point) 
          MoveTP=minStop*Point*(-1)+Ask-OrderTakeProfit(); //Set the new distance to minimum safe point, -OTP() cancels OTP() // repared error 4051
      }
      else 
      {
        MoveTP=E_MoveTPonTS*Point;
        if(OrderTakeProfit()-Bid+MoveTP<minStop*Point && Bid-sl>=minStop*Point) 
          MoveTP=minStop*Point-Bid+OrderTakeProfit();  //Set the new distance to minimum safe point, -OTP() cancels OTP()
      }
    }
    
    if(U_WriteDebug) L3_WriteDebug("MODIFY Ticket:"+ticket+" OpenPrice:"+OrderOpenPrice()+" SL:"+sl+" TP:"+(OrderTakeProfit()+MoveTP*Point));
    if(NormalizeDouble(sl/Point,0)==NormalizeDouble(OrderStopLoss()/Point,0)) return(true);  
    if(OrderModify ( ticket, OrderOpenPrice(), sl,
                      OrderTakeProfit()+MoveTP,   
                      0, Red) ==(-1)) 
        return(false);
    else return(true);
  }

Last edited by yoyo; 02-21-2008 at 08:17 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #417 (permalink)  
Old 02-21-2008, 08:20 PM
Junior Member
 
Join Date: Feb 2008
Posts: 2
yoyo is on a distinguished road
Hello Glogus2008,

Could you send me a "private messade" with your "Phoenix 6 Released" running version ?

Thanks,

yoyo


Quote:
Originally Posted by globus2008 View Post
Hello Alkhal4, Togu and all,

The Phoenix 6 Released doesn't work to you because originally extern variable "F_ATR" is set up on value 0.6 and it should be around 0.0001. But then when you run it you will find in a Journal a lot of "Ordermodify errors Nr.130". It is because there are bugs in functions "X1_ManageExit" and "X9_ModifySL". I have found two solutions not to display them :
1) Set up variable E_BE_SL=0 . But then you can not trade break even.
2) Replace these two functions "X1_ManageExit" and "X9_ModifySL" with my scripts in a source mq4 file. See below.

If you want and if you are not able to do it alone, I can send you this EA without these bugs but I don't want to upload EA here because it is in violation of Hendrick's wish - - see first post in Phoenix 2007 (new thread) .

This problem must have also others and I please a man who cares about source code of Phoenix (it was Hendrick, now daraknor ? - I don't know I have red only a couple of messages ) for debugging and putting correct version in the first post.

repared code of function "X1_ManageExit" :
Code:
//**********  Exit Strategies & Trailing Stops **********************************//
void X1_ManageExit(int myticket)
{ //Contains all of the exit strategies and trade management routines. Listed in priority.
    minStop=MarketInfo(Symbol(),MODE_STOPLEVEL); //updated every tick in case of news SL movement
  
    if(E_GraceHours !=0 ||E_ForceHours !=0) 
      X1_ForceClose_or_GraceModify(myticket);
  
    if(E_RecrossMax!=0)
      {
        double price;
          if (OrderType() == OP_BUY)   price=Bid;
          if (OrderType() == OP_SELL)  price=Ask;
          if(Bars>bcRecross)
            { //Bar hasn't been counted yet
              if(OrderOpenPrice()>price-1 && OrderOpenPrice()<price+1)
                {
                  recrosscount++;
                  bcRecross=Bars;

                  if (recrosscount>=E_RecrossMax)
                     if(!OrderClose(myticket,OrderLots(),price,AcceptSlip,Red)) 
                       L4_WriteError();
                }
              }
    
      }
  //TODO StealthExit  
  if(E_BE_SL>0)
  {  //    BreakEven SL @target
    if(E_BE_SL<E_BE_Profit+minStop) E_BE_Profit=E_BE_SL-minStop; //keeps trade safe all of the time
    if (OrderType() == OP_BUY && Bid-OrderOpenPrice()>=Point*E_BE_SL && OrderStopLoss()-Point*E_BE_Profit<OrderOpenPrice() && Bid-OrderOpenPrice()-E_BE_Profit*Point>=minStop*Point)
        X9_ModifySL(OrderOpenPrice()+E_BE_Profit*Point,myticket); 
    if (OrderType() == OP_SELL && OrderOpenPrice()-Ask>=Point*E_BE_SL+MarketInfo(Symbol(),MODE_SPREAD)*Point && OrderStopLoss()+Point*E_BE_Profit+MarketInfo(Symbol(),MODE_SPREAD)*Point>OrderOpenPrice() && OrderOpenPrice()+E_BE_Profit*Point+MarketInfo(Symbol(),MODE_SPREAD)*Point-Ask>=minStop*Point)
        X9_ModifySL(OrderOpenPrice()-E_BE_Profit*Point-MarketInfo(Symbol(),MODE_SPREAD)*Point,myticket); 
  }
repared code of function "X9_ModifySL" :
Code:
bool X9_ModifySL(double sl, int ticket)
  {
    double MoveTP;
    if(E_MoveTPonTS !=0)
    {
      if (OrderType() == OP_SELL) 
      {
        MoveTP=E_MoveTPonTS*(-1)*Point;
        if(Ask-OrderTakeProfit()+MoveTP<minStop*Point && sl-Ask>=minStop*Point) 
          MoveTP=minStop*Point*(-1)+Ask-OrderTakeProfit(); //Set the new distance to minimum safe point, -OTP() cancels OTP() // repared error 4051
      }
      else 
      {
        MoveTP=E_MoveTPonTS*Point;
        if(OrderTakeProfit()-Bid+MoveTP<minStop*Point && Bid-sl>=minStop*Point) 
          MoveTP=minStop*Point-Bid+OrderTakeProfit();  //Set the new distance to minimum safe point, -OTP() cancels OTP()
      }
    }
    
    if(U_WriteDebug) L3_WriteDebug("MODIFY Ticket:"+ticket+" OpenPrice:"+OrderOpenPrice()+" SL:"+sl+" TP:"+(OrderTakeProfit()+MoveTP*Point));
    if(NormalizeDouble(sl/Point,0)==NormalizeDouble(OrderStopLoss()/Point,0)) return(true);  
    if(OrderModify ( ticket, OrderOpenPrice(), sl,
                      OrderTakeProfit()+MoveTP,   
                      0, Red) ==(-1)) 
        return(false);
    else return(true);
  }
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #418 (permalink)  
Old 02-24-2008, 05:36 PM
Pcontour's Avatar
Senior Member
 
Join Date: Nov 2006
Location: Canada
Posts: 176
Pcontour is on a distinguished road
How to find - Best Version of Phoenix

Quote:
Originally Posted by Behzad2008 View Post
Hello to all...

Which version of "Phoenix" is better?

"Hendrik's Phoenix" or "daraknor's Phoenix" ?

please tell me one...thanks
How to find what I consider to be best working copy of Phoenix.
  1. Click on the Search menu item at the very top (for the whole forum - not for this thread)
  2. Paste the "Best Version of Phoenix" including the "
  3. Select Show Posts.
  4. Press GO
  5. Find that phrase in the subject, and click that one from the list of Posts
  6. Find that post on the page that comes up.
  7. Read that whole post - the documentation is at the bottom and there is a link to the code.
__________________
regards

PC

Last edited by Pcontour; 02-24-2008 at 05:38 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #419 (permalink)  
Old 03-03-2008, 06:15 AM
Junior Member
 
Join Date: Feb 2008
Posts: 8
comorg is on a distinguished road
Installation IBFX MT4

Downloaded Phoenix 5.6.3, installed in experts last night, compiled, placed in price chart: in upper right. No trades placed overnight, this AM there was an x. I tried to compile again, blue icon in experts...removed it from price window, double click, and smiley briefly appears, then switches to x. What is going on? Thanks for help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #420 (permalink)  
Old 03-03-2008, 11:41 AM
Junior Member
 
Join Date: Jan 2008
Posts: 5
alkhal4 is on a distinguished road
Hello

Thanks for your response, I tried to do what you suggested below,
I replaced the codes but when compiling I get an error - probably because I don't know how to do step 1 - could you send the correct code.

Thanks


Quote:
Originally Posted by globus2008 View Post
Hello Alkhal4, Togu and all,

The Phoenix 6 Released doesn't work to you because originally extern variable "F_ATR" is set up on value 0.6 and it should be around 0.0001. But then when you run it you will find in a Journal a lot of "Ordermodify errors Nr.130". It is because there are bugs in functions "X1_ManageExit" and "X9_ModifySL". I have found two solutions not to display them :
1) Set up variable E_BE_SL=0 . But then you can not trade break even.
2) Replace these two functions "X1_ManageExit" and "X9_ModifySL" with my scripts in a source mq4 file. See below.

If you want and if you are not able to do it alone, I can send you this EA without these bugs but I don't want to upload EA here because it is in violation of Hendrick's wish - - see first post in Phoenix 2007 (new thread) .

This problem must have also others and I please a man who cares about source code of Phoenix (it was Hendrick, now daraknor ? - I don't know I have red only a couple of messages ) for debugging and putting correct version in the first post.

repared code of function "X1_ManageExit" :
Code:
//**********  Exit Strategies & Trailing Stops **********************************//
void X1_ManageExit(int myticket)
{ //Contains all of the exit strategies and trade management routines. Listed in priority.
    minStop=MarketInfo(Symbol(),MODE_STOPLEVEL); //updated every tick in case of news SL movement
  
    if(E_GraceHours !=0 ||E_ForceHours !=0) 
      X1_ForceClose_or_GraceModify(myticket);
  
    if(E_RecrossMax!=0)
      {
        double price;
          if (OrderType() == OP_BUY)   price=Bid;
          if (OrderType() == OP_SELL)  price=Ask;
          if(Bars>bcRecross)
            { //Bar hasn't been counted yet
              if(OrderOpenPrice()>price-1 && OrderOpenPrice()<price+1)
                {
                  recrosscount++;
                  bcRecross=Bars;

                  if (recrosscount>=E_RecrossMax)
                     if(!OrderClose(myticket,OrderLots(),price,AcceptSlip,Red)) 
                       L4_WriteError();
                }
              }
    
      }
  //TODO StealthExit  
  if(E_BE_SL>0)
  {  //    BreakEven SL @target
    if(E_BE_SL<E_BE_Profit+minStop) E_BE_Profit=E_BE_SL-minStop; //keeps trade safe all of the time
    if (OrderType() == OP_BUY && Bid-OrderOpenPrice()>=Point*E_BE_SL && OrderStopLoss()-Point*E_BE_Profit<OrderOpenPrice() && Bid-OrderOpenPrice()-E_BE_Profit*Point>=minStop*Point)
        X9_ModifySL(OrderOpenPrice()+E_BE_Profit*Point,myticket); 
    if (OrderType() == OP_SELL && OrderOpenPrice()-Ask>=Point*E_BE_SL+MarketInfo(Symbol(),MODE_SPREAD)*Point && OrderStopLoss()+Point*E_BE_Profit+MarketInfo(Symbol(),MODE_SPREAD)*Point>OrderOpenPrice() && OrderOpenPrice()+E_BE_Profit*Point+MarketInfo(Symbol(),MODE_SPREAD)*Point-Ask>=minStop*Point)
        X9_ModifySL(OrderOpenPrice()-E_BE_Profit*Point-MarketInfo(Symbol(),MODE_SPREAD)*Point,myticket); 
  }
repared code of function "X9_ModifySL" :
Code:
bool X9_ModifySL(double sl, int ticket)
  {
    double MoveTP;
    if(E_MoveTPonTS !=0)
    {
      if (OrderType() == OP_SELL) 
      {
        MoveTP=E_MoveTPonTS*(-1)*Point;
        if(Ask-OrderTakeProfit()+MoveTP<minStop*Point && sl-Ask>=minStop*Point) 
          MoveTP=minStop*Point*(-1)+Ask-OrderTakeProfit(); //Set the new distance to minimum safe point, -OTP() cancels OTP() // repared error 4051
      }
      else 
      {
        MoveTP=E_MoveTPonTS*Point;
        if(OrderTakeProfit()-Bid+MoveTP<minStop*Point && Bid-sl>=minStop*Point) 
          MoveTP=minStop*Point-Bid+OrderTakeProfit();  //Set the new distance to minimum safe point, -OTP() cancels OTP()
      }
    }
    
    if(U_WriteDebug) L3_WriteDebug("MODIFY Ticket:"+ticket+" OpenPrice:"+OrderOpenPrice()+" SL:"+sl+" TP:"+(OrderTakeProfit()+MoveTP*Point));
    if(NormalizeDouble(sl/Point,0)==NormalizeDouble(OrderStopLoss()/Point,0)) return(true);  
    if(OrderModify ( ticket, OrderOpenPrice(), sl,
                      OrderTakeProfit()+MoveTP,   
                      0, Red) ==(-1)) 
        return(false);
    else return(true);
  }
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
mq4 profitable tested, phoenix, phoenix ea, phoenix mq4, Phoenix_5_6_03.mq4, phoenix_ea_v5_6_03.mq4, Price Action Channel mq4


Currently Active Users Viewing This Thread: 2 (1 members and 1 guests)
oedo
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Phoenix - FAQ, Stable, User support -Read Post #1" depictureboy Phoenix 189 04-11-2009 05:23 PM
Phoenix 6 - Development, Download, Bugs - See Post#1 daraknor Phoenix 88 12-20-2008 12:50 AM
Suggestions for a 4 hr. Trading System? marcf Suggestions for Trading Systems 2 05-23-2007 08:20 PM


All times are GMT. The time now is 01:00 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.