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.
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.
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.
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!
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.
Could you send me a private message, with your "Phoenix 6 Released" running version ?
Thanks,
yoyo
Quote:
Originally Posted by globus2008
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);
}
Could you send me a "private messade" with your "Phoenix 6 Released" running version ?
Thanks,
yoyo
Quote:
Originally Posted by globus2008
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);
}
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.
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
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);
}