Forex



Go Back   Forex Trading > Trading systems > Phoenix






Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
Thread Tools Display Modes
  #11 (permalink)  
Old 03-30-2007, 10:14 PM
cockeyedcowboy's Avatar
Senior Member
 
Join Date: Nov 2005
Posts: 474
cockeyedcowboy is on a distinguished road
I came across this post on another thread, I would like to draw you attention to the code sample give. Its part of the new Phoenix stop management.

I never looked at any of daraknor code before and did not care to see this as well. But it was there ... Boy ... am speechless ... What a mess ... He doesnot know how to program, hes learning on this project. I have to say hes a fast learner. But this code is overflowing all over ... its done in a style that will garrantee bugs. He doenot understand Procedural protocal at all and is claming to code in modules. Look at the last function ModifySL() the name implies that the stop loss will be changed but the Take Profit is being changed as well behine the sence without your knowledge. That is so wrong. The function is of BOOL type and returns nothing and no returns statements in any Procedural construction. By the way Learn what the differents between a function procedure and routine procedure are.

I have re-writen the code, don't know if there are any errors in it as I did not check his math nor did I test it. This is a learning exersise for Daraknor.

And if you dont like my spelling TAFF.

The CockeyedCowboy
Rides again



Quote:
Originally Posted by daraknor

Velocity4x is a whitelabel company. I called them and asked a bunch of questions. They share a liquidity pool with IBFX, FXLQ and FXSOL although they did not state so explicitly (vague references to a 3 member exchange, "our bank", and other crap identical to crap fed by the parties mentioned.)

MiG has a very erratic signal from what I saw scanning their charts. We did live testing for Phoenix on several brokers, and FXDD almost always was the top performer. The second in line, occasionally first, was NF. I researched FXDD extensively, but not have done so for NF. PhoenixFund (a nonprofit that funds UN Development Program goals with EA trading proceeds) is now (finally) an IB for FXDD after months of work. (We did testing first, and then went with the winner.)

As for trailing stops, I have had long term 'average wins' several times higher than my TP thanks to tight delayed super-increasing trailing stops. (Eat those news events!) The trailing stop code was developed with the idea that we shouldn't leave pips on the table. Phoenix beta is getting a code cleaning/review from a fellow developer, here is the latest trailing stop code:

Code:
extern int staticTS =20; extern bool MoveTPonTS=1; //increase Trailing stop by this value in pips each time TS is adjusted. Allows good trades to rise higher extern int U_DelayTS=0;
//Every Tick, during order processing: if (ExitManagedOn) trailingStop(myticket,staticTS,U_DelayTS);
void trailingStop (int ticket, int tsvalue, int delayts) { //TS Function, easily called by multiple exit strategies. double slvalue; Debug("EXIT:TS ticket:"+ticket+" tsvalue:"+tsvalue+" delayts:"+delayts); if (OrderType() == OP_BUY) { slvalue=Bid-(Point*tsvalue); if (OrderStopLoss() < slvalue && OrderOpenPrice()+Point*delayts<Bid+tsvalue*Point) { //Debug("OrderSL:" +OrderStopLoss()+ " slvalue:"+ slvalue); if (!ModifySL(slvalue,ticket)) LogError(); } } else { if (OrderType() == OP_SELL) { slvalue=Ask+(Point*tsvalue); if (OrderStopLoss() > slvalue && OrderOpenPrice()-Point*delayts>Ask-tsvalue*Point) { //Debug("OrderSL:" +OrderStopLoss()+ " slvalue:"+ slvalue); ModifySL(slvalue,ticket); } } } } bool ModifySL(double sl, int ticket) { //Moving SL function, easily called by other exit strategies. int MoveTP; if (OrderType() == OP_SELL) MoveTP=MoveTPonTS*(-1); else MoveTP=MoveTPonTS; Debug("MODIFY Ticket:"+ticket+" OpenPrice:"+OrderOpenPrice()+" SL:"+sl+" TP:"+(OrderTakeProfit()+MoveTP*Point)); if(OrderModify(ticket,OrderOpenPrice(),sl,OrderTakeProfit()+MoveTP*Point,0,Red)!=(-1)) LogError(); }



Code:
 
 
 
        extern int
            BaseTrailStop    =  20,          DelayTrailStop  =  0;
        extern bool
            AdvanceTrailStop  =   1;
 
 
        bool
            ManagedStops   =  ON,  // Switch to apply a trailing stop to the system orders.
            DeBugMessages  =  ON;  // Switch to display DeBugging messages for code development stage.
 
 
 
    if( ManagedStops )
        TrailingStop( TicketNumber, BaseTrailStop, DelayTrailStop );
 
 
    //«« <<<< Management of Trailing Stops, Routine Procedure >>>> »»»»»»»»»»»»»»»»»»»»»»»»»»»»
    void
        TrailingStop( int Ticket, int StopValue, int Delay ) {
            double NewStop  =  0;
                if( OrderSelect( Ticket, SELECT_BY_TICKET )  == True );
                    if( OrderType() == OP_BUY ) {
                        NewStop  =  Bid - ( Point * StopValue );
                        if( OrderStopLoss() < NewStop && OrderOpenPrice() + Point * Delay < Bid + StopValue * Point )
                            ModifyStopLoss( Ticket, NewStop ) {
                    } else if( OrderType() == OP_SELL ) {
                        NewStop  =  Ask + ( Point * StopValue );
                        if( OrderStopLoss() > NewStop && OrderOpenPrice() - Point * Delay > Ask - StopValue * Point )
                            ModifyStopLoss( Ticket, NewStop ) {
                    } else {
                        if( DeBugMessages )
                            Print( "Error: Unreconized order type in TSFunction, Order Type: " + OrderType() );
                    } // End if, OrderType:
                } else {
                    if( DeBugMessages )
                        Print( "Error: Unreconized order number in TSFunction, Ticket: " + Ticket );
                } // End If, OrderSelect:
        return;
    } // End Routine Procedure, TrailingStop:
 
 
    //«« <<<< Moddifing of Trailing Stops, Routine Procedure >>>> »»»»»»»»»»»»»»»»»»»»»»»»»»»»»
    void
        ModifyStopLoss( int Order, double MoveStop ) {
            if( OrderModify( Ticket, OrderOpenPrice(), MoveStop, OrderTakeProfit(), 0, Red ) == True ) {
                Print( "Order Stop Loss Modified Order Number: " + Order + " Seccessfully completed" ):
            } else {
                if( DeBugMessages )
                    Print( "Error in ModifyStopLoss Function: Modifing Order Number; " + Order + " Failed" );
            } // End If, OrderModify:
        return;
    } // End Routine Procedure, ModifyStopLoss:
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
  #12 (permalink)  
Old 03-31-2007, 05:10 AM
daraknor's Avatar
Senior Member
 
Join Date: Oct 2006
Location: Portland, OR USA
Posts: 996
daraknor is on a distinguished road
MoveTPonTS is zero in other code versions. It is a user configurable parameter, and I refer to the trailing stops as "tight, delayed and expanding" Use of trailing stops normally decreases the average profit. Use of tight, delayed, expanding TS increases the average profit in 4 EA myself and others have tested it on.
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
  #13 (permalink)  
Old 03-31-2007, 08:43 PM
Pcontour's Avatar
Senior Member
 
Join Date: Nov 2006
Location: Canada
Posts: 176
Pcontour is on a distinguished road
Thumbs up Documentation Phoenix 6 ?

The documentation for P6 is very important, however I am not inclined to create any P6 documentation, until I understand whether there will be preferred setting again like P5. If not what are your thoughts on the prefix for the variable names for the external variables. They are a mix of P_ and U_ at the moment. I would like to have stabilized signals and variable names before documentation starts. I don't want to have too much change going on.

The difference between Chimera and Phoenix is just the entry signals.

Last edited by Pcontour; 03-31-2007 at 09:28 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
  #14 (permalink)  
Old 04-03-2007, 01:57 AM
Pcontour's Avatar
Senior Member
 
Join Date: Nov 2006
Location: Canada
Posts: 176
Pcontour is on a distinguished road
What up with TimeCurrent() ?

For Phoenix 6, why does MetaEditor give me compile errors saying TimeCurrent - function is not defined? What do I need to do. For now I am using Time[0].

Last edited by Pcontour; 04-03-2007 at 02:07 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
  #15 (permalink)  
Old 04-03-2007, 08:12 PM
daraknor's Avatar
Senior Member
 
Join Date: Oct 2006
Location: Portland, OR USA
Posts: 996
daraknor is on a distinguished road
I won't use Time[0] because it just returns the opening time of the current bar. Feel free to use Time[0] if you like, but I recommend upgrading your version of MT4. What build are you running?
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
  #16 (permalink)  
Old 04-04-2007, 01:15 AM
Pcontour's Avatar
Senior Member
 
Join Date: Nov 2006
Location: Canada
Posts: 176
Pcontour is on a distinguished road
Quote:
Originally Posted by daraknor
I won't use Time[0] because it just returns the opening time of the current bar. Feel free to use Time[0] if you like, but I recommend upgrading your version of MT4. What build are you running?
I upgraded to 2.03 but, I was using 1.98 MetaEditor, because I have two version installed now. Thanks. I made sure I was using 2.03 MetaEditor and tried again.
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
  #17 (permalink)  
Old 04-04-2007, 03:28 AM
rudichandra1980's Avatar
Junior Member
 
Join Date: Feb 2007
Posts: 3
rudichandra1980 is on a distinguished road
testing phoenix to other pair except Usd Jpy

i've been testing phoenix with optimizer,
but it only works on Usd Jpy
and not the others
can u help me with the setting?
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
  #18 (permalink)  
Old 04-04-2007, 03:41 AM
daraknor's Avatar
Senior Member
 
Join Date: Oct 2006
Location: Portland, OR USA
Posts: 996
daraknor is on a distinguished road
If you are using Phoenix6 you need to edit the name of the currency. If you are testing GBPUSD, the settings file would show GBPUSD in the U_Trade_Currency field. I believe the default you're using is USDJPY. I know this is a hassle for optimization, but the settings are actually this specific too :/
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
  #19 (permalink)  
Old 04-04-2007, 07:11 AM
Junior Member
 
Join Date: Nov 2006
Posts: 2
gertl is on a distinguished road
Hello everyone
I would like to know:
Is P6 still time sensitive? Meaning do I have to start it Sunday evening and turn it off Saturday, or can I open and close everyday anytime and still get good results?
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
  #20 (permalink)  
Old 04-05-2007, 01:54 AM
daraknor's Avatar
Senior Member
 
Join Date: Oct 2006
Location: Portland, OR USA
Posts: 996
daraknor is on a distinguished road
Both, but the account won't synchronize with other traders if you keep opening and closing it and they don't. There is also the ability to turn it off friday afternoon and back on monday at midnight in the EA
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
RSI R2, phoenix 6, forex, phoenix

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 - Development+Suggestions - MQ4 in Post#1 daraknor Phoenix 435 10-18-2009 08:08 PM
"Phoenix - FAQ, Stable, User support -Read Post #1" depictureboy Phoenix 189 04-11-2009 05:23 PM
Strategy tester bugs Aaragorn Expert Advisors - Metatrader 4 1 06-23-2006 12:28 AM


All times are GMT. The time now is 07:23 AM.



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