#176   Add to Hendrick's Reputation  Report Bad Post 

Old10-16-2006, 09:11 AM

Hendrick's Avatar

Hendrick Hendrick is online now

Senior Member

 

Join Date: Feb 2006

Posts: 468

Hendrick is on a distinguished road

Quote:

Originally Posted by kowal666

hey folks,

I've quastion too, i started you ea on 24h working pc with default settings. But my base balance is not in USD but in PLN (about 3:1) will MM work with my balance. When i entry in (example) USDJPY at 0,1 lot it cost me about 312 from balacne.

p.s. i run it on eurusd,gpbusd,usdcfh,usdjpy,eurjpy,eurchf,usdcad as rest of pairs have to big spread with my local broker...

By the way, REALLY GREAT JOB and HONEST live targets!!!! (compabityle with mine)


Hi Kowal!

Well that's a tricky one! Didn't think about that before. Give me some time and maybe I will find a solution to use MM with your PLN account.

Reply With Quote

del.icio.us   » digg   » Reddit

 

  #197   Add to ericbach's Reputation  Report Bad Post 

Old10-16-2006, 04:11 PM

ericbach ericbach is offline

Junior Member

 

Join Date: Jan 2006

Posts: 13

ericbach is on a distinguished road

Quote:

Originally Posted by Oligarh

Who can that to test EUR with parameters TP 69 Sl 70

After further reviewing these numbers , I get just a little more profit than 42, 84. Thats all so far. I think there is a potential to get a little more profit, but the risks might outway the results.

Anyway, here is a neat add-on.
Adding these lines in two locations in the program will enable you to get an email text message of the buy and sell signal. Then I could just call up my broker. I use it on my cellphone while I am at work.
Enjoy

//=================SELL CONDITIONS====

if((SellSignal1==true) && (SellSignal2==true) && (SellSignal3==true) && (SellSignal4==true) && (SellSignal5==true))
{
res=OrderSend(Symbol(),OP_SELL,LotsOptimized(),Bid ,3,Bid+StopLoss*Point,Bid-TakeProfit*Point,"Phoenix2007",MAGICMA,0,Red);
SendMail("15m EUR SELL SIGNAL",Symbol());
return;
}

//=================BUY CONDITIONS====

if((BuySignal1==true) && (BuySignal2==true) && (BuySignal3==true) && (BuySignal4==true) && (BuySignal5==true))
{

res=OrderSend(Symbol(),OP_BUY,LotsOptimized(),Ask, 3,Ask-StopLoss*Point,Ask+TakeProfit*Point,"Phoenix2007", MAGICMA,0,Blue);
SendMail("15m EUR BUY SIGNAL",Symbol());
return;
}

Reply With Quote

del.icio.us   » digg   » Reddit

 

  #212   Add to Hendrick's Reputation  Report Bad Post 

Old10-17-2006, 10:08 AM

Hendrick's Avatar

Hendrick Hendrick is online now

Senior Member

 

Join Date: Feb 2006

Posts: 468

Hendrick is on a distinguished road

Quote:

Originally Posted by frantacech

Hi Hendrick,
I trust on Phoenix to win
Excellent job!

I am one question. Can you how modify this EA for futures - NDDEC6 nasdaq or S&P contracts SPDEC6?

Thanx


Hi,

No, that's beyond my power!

Reply With Quote

del.icio.us   » digg   » Reddit

 


  #215   Add to lowphat's Reputation  Report Bad Post 

Old10-17-2006, 12:48 PM

lowphat lowphat is offline

Senior Member

 

Join Date: Sep 2005

Posts: 132

lowphat is on a distinguished road

Send a message via AIM to lowphatSend a message via Yahoo to lowphat

When i was in my env faze last year instead of using bool for switches I used int so it can be optimized. With this all your filter selection can be optimized along with your settings for all you optimization nutz.
This does not change how it trades at all its just cosmetic but if you want me to to remove this file I will

Attached Files

File Type: ex4

Phoenix_EA_v4_2_03PhatMod.ex4 (14.7 KB, 34 views)

File Type: mq4

Phoenix_EA_v4_2_03PhatMod.mq4 (15.7 KB, 69 views)


Last edited by lowphat : 10-17-2006 at 01:12 PM.

Reply With Quote

del.icio.us   » digg   

 


 

  #218   Add to ericbach's Reputation  Report Bad Post 

Old10-17-2006, 10:44 PM

ericbach ericbach is offline

Junior Member

 

Join Date: Jan 2006

Posts: 13

ericbach is on a distinguished road

Quote:

Originally Posted by Hendrick

Well, I don't know about your results with Booster, but those of mine were not very promising. It also makes no sense in my opinion to open four trades that are correlated: they could go all against you so to me this looks more like gambling.

For the time being I will concentrate on the further development of Phoenix 4.2 and put Booster on the shelf (unless you guys have ideas how to improve it).

Nevertheless I think the concept of currency correlation can be used in Phoenix 4.2. This is my idea: if there's a BUY/SELL signal for a pair, the EA will first check if there any open trades for pairs that have a strong correlation with the pair where you get the signal for. If so the signal is not valid. Another option is to look how the open correlated trade is doing: is it loosing or is it in profit. Based on that a decision can be made to open the new trade or not.

Let' stick for the moment to the first option: don't trade if a strongly correlated trade is open. For those of you, who had tested Phoenix for a longer time: in your Account History you can see if this makes sense or not. I would be most grateful if some of you could check this and report it back to this forum.

You can use this summary. First column is the pair where you get BUY/SELL signal for and the second column are the pairs that are strongly correlated to the first pair. So if you get a BUY/SELL signal for the EURUSD and there is an open trade for the USDCHF or USDCAD then the signal is not valid:

EURUSD USDCHF, USDCAD
USDJPY GBPUSD, EURCHF, GBPJPY
USDCHF EURUSD, GBPJPY
USDCAD EURUSD
AUDUSD GBPUSD
EURJPY GBPUSD, EURCHF
GBPUSD USDJPY, EURCHF, GBPJPY
EURCHF USDJPY, GBPUSD, EURJPY, GBPJPY
CHFJPY EURCHF
EURGBP EURJPY


What if one uses currency correlation to place a time constrant on whether to close a non-producing trade. Say one has an open eurusd position not going anywhere then later-on gets a usdchf signal in reverse correlation direction. Then one needs to close the non-producing eurusd position and open the current usdchf position since its more update with current market condition and the eurusd position is no longer valid. Also by closing non-producing eurusd position frees system up to receive newer updated eurusd trading positions.

Reply With Quote

del.icio.us   » digg   » Reddit

  #220   Add to Hendrick's Reputation  Report Bad Post 

Old10-17-2006, 11:21 PM

Hendrick's Avatar

Hendrick Hendrick is online now

Senior Member

 

Join Date: Feb 2006

Posts: 468

Hendrick is on a distinguished road

Quote:

Originally Posted by ericbach

What if one uses currency correlation to place a time constrant on whether to close a non-producing trade. Say one has an open eurusd position not going anywhere then later-on gets a usdchf signal in reverse correlation direction. Then one needs to close the non-producing eurusd position and open the current usdchf position since its more update with current market condition and the eurusd position is no longer valid. Also by closing non-producing eurusd position frees system up to receive newer updated eurusd trading positions.


Yes, I think I like the idea. But I need some more information. How to define a non-producing trade? Is it a trade that's a certain amount of pips in loss? Or is it a trade that's moving around its opening price for let's say the last 24 hours?

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #221   Add to fikko's Reputation  Report Bad Post 

Old10-18-2006, 12:01 AM

fikko fikko is offline

Senior Member

 

Join Date: May 2006

Posts: 133

fikko is on a distinguished road

Quote:

Originally Posted by Hendrick

Well, I don't know about your results with Booster, but those of mine were not very promising. It also makes no sense in my opinion to open four trades that are correlated: they could go all against you so to me this looks more like gambling.

For the time being I will concentrate on the further development of Phoenix 4.2 and put Booster on the shelf (unless you guys have ideas how to improve it).

Nevertheless I think the concept of currency correlation can be used in Phoenix 4.2. This is my idea: if there's a BUY/SELL signal for a pair, the EA will first check if there any open trades for pairs that have a strong correlation with the pair where you get the signal for. If so the signal is not valid. Another option is to look how the open correlated trade is doing: is it loosing or is it in profit. Based on that a decision can be made to open the new trade or not.

Let' stick for the moment to the first option: don't trade if a strongly correlated trade is open. For those of you, who had tested Phoenix for a longer time: in your Account History you can see if this makes sense or not. I would be most grateful if some of you could check this and report it back to this forum.

You can use this summary. First column is the pair where you get BUY/SELL signal for and the second column are the pairs that are strongly correlated to the first pair. So if you get a BUY/SELL signal for the EURUSD and there is an open trade for the USDCHF or USDCAD then the signal is not valid:

EURUSD USDCHF, USDCAD
USDJPY GBPUSD, EURCHF, GBPJPY
USDCHF EURUSD, GBPJPY
USDCAD EURUSD
AUDUSD GBPUSD
EURJPY GBPUSD, EURCHF
GBPUSD USDJPY, EURCHF, GBPJPY
EURCHF USDJPY, GBPUSD, EURJPY, GBPJPY
CHFJPY EURCHF
EURGBP EURJPY



Hi Hendrick,

There is a good post there regarding hedging using co-relation pairs.

http://www.forex-tsd.com/46663-post38.html

 

  #222   Add to frantacech's Reputation  Report Bad Post 

Old10-18-2006, 01:11 AM

frantacech frantacech is offline

Junior Member

 

Join Date: Sep 2006

Posts: 12

frantacech is on a distinguished road

Quote:

Originally Posted by Hendrick

Yes, I think I like the idea. But I need some more information. How to define a non-producing trade? Is it a trade that's a certain amount of pips in loss? Or is it a trade that's moving around its opening price for let's say the last 24 hours?


Maybe don't open NEW trade 5pm NY do 0:00 NY - Asia flat?

This your bad trade in championship?


Last edited by frantacech : 10-18-2006 at 01:14 AM.

Reply With Quote

del.icio.us   » digg   » Reddit

 

 

 

 

 


 

  #223   Add to Hendrick's Reputation  Report Bad Post 

Old10-18-2006, 07:45 AM

Hendrick's Avatar

Hendrick Hendrick is online now

Senior Member

 

Join Date: Feb 2006

Posts: 468

Hendrick is on a distinguished road

Help wanted!


I would be very grateful if some of you can make the next summary:



Look at your Account History and look for every trade at its opening and closing time. Is there some kind of correlation between the total time a trade is open and if it's profitable or not? I've not analysed my own Account History but it seems to me that the longer a trade is open the less chance it will be profitable.



So, for those who have an Account History of 2 weeks or more and if you have the time can you please make such a summary. It would really help me!

Reply With Quote

del.icio.us   » digg   » Reddit

 

 

 


 

  #238   Add to Hendrick's Reputation  Report Bad Post 

Old10-18-2006, 11:06 AM

Hendrick's Avatar

Hendrick Hendrick is offline

Senior Member

 

Join Date: Feb 2006

Posts: 468

Hendrick is on a distinguished road

Quote:

Originally Posted by ericbach

After looking over the results, it seems the reason usdyen and gbpyen are doing the best is they have the shortest time of trades therefore they can open up another trade while the other pairs are still locked up on old trade.
Maybe a good rule is to keep open usdyen and gbpyen for max. 24hrs, then close and reset expert.
For eurusd, usdchf, and usdcad trade needs to stay open a max 48hrs, otherwise its not worth it.
Any trade left open after 48hrs should be closed and also close all trades over the weekend.
I wonder how this time constrant would effect overall results.


Thanks Eric! I think this is a usefull contribution to this thread.

Reply With Quote

del.icio.us   » digg   » Reddit

 

 


 

  #253   Add to DrLucky's Reputation  Report Bad Post 

Old10-19-2006, 10:48 AM

DrLucky DrLucky is offline

Junior Member

 

Join Date: Apr 2006

Posts: 2

DrLucky is on a distinguished road

a little bug in phoenix


I'm originally intersted in algorithms instead of back testing results,i took close look to phoenix code yesterday, and it seems there is a little bug (not actuall bug) in divergence function:

maF1 = iMA(Symbol(), 0, F_Period, 0, MODE_SMA, F_Price, mypos);
maS1 = iMA(Symbol(), 0, S_Period, 0, MODE_SMA, S_Price, mypos);
dv1 = (maF1 - maS1);

maF2 = iMA(Symbol(), 0, F_Period, 0, MODE_SMA, F_Price, mypos + 1);
maS2 = iMA(Symbol(), 0, S_Period, 0, MODE_SMA, S_Price, mypos + 1);
dv2 = ((maF1 - maS1) - (maF2 - maS2));

return(dv1 - dv2);

you calculate (maF1 - maS1) expression twice and subtract them when you want to return them in line :
return(dv1 - dv2);
so it just simply a return of :
return(maF2 - maS2);

i changed it and the same result has been achieved, so i think first line of code is useless and we can rewrite the function like this:

maF2 = iMA(Symbol(), 0, F_Period, 0, MODE_SMA, F_Price, mypos + 1);
maS2 = iMA(Symbol(), 0, S_Period, 0, MODE_SMA, S_Price, mypos + 1);

return(maF2 - maS2);

so it will increase the speed of backtesting or correct me if i'm wrong,according to your first post we are not allowed to change the code, so please do it for us, and at last i apologize for my bad english.

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #254   Add to Vedmak's Reputation  Report Bad Post 

Old10-19-2006, 11:43 AM

Vedmak Vedmak is offline

Junior Member

 

Join Date: Oct 2006

Posts: 5

Vedmak is on a distinguished road

Quote:

Originally Posted by DrLucky

i think first line of code is useless and we can rewrite the function like this:

maF2 = iMA(Symbol(), 0, F_Period, 0, MODE_SMA, F_Price, mypos + 1);
maS2 = iMA(Symbol(), 0, S_Period, 0, MODE_SMA, S_Price, mypos + 1);

return(maF2 - maS2);

so it will increase the speed of backtesting or correct me if i'm wrong,according to your first post we are not allowed to change the code, so please do it for us, and at last i apologize for my bad english.


You are absolutely right.

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #260   Add to daraknor's Reputation  Report Bad Post 

Old10-19-2006, 07:03 PM

daraknor's Avatar

daraknor daraknor is offline

Senior Member

 

Join Date: Oct 2006

Posts: 133

daraknor is on a distinguished road

I am not running your excellent EA yet Hendrik but I had some ideas regarding trade windows.

Due to the highly fractal nature of price movements, it may make sense to autoscale the time of the trade window, exit/stop signals, etc. A policy may also be written about days to hold a position with swap as a basis. Holding some positions will really hurt, due to swap costs. Why pay more to hold on a position that isn't moving?

Here is a Murrey Math student with a method for calculating interval to apply a fractal analysis method:
http://web.archive.org/web/200301151...TKnotes.1.html
Pulled from the archives, it is step 3 and varies based on the price variation. There is also information that may be used to determine fractally scaled exit and stop positions.

The math seems simple enough, the harder part about a MM system appears to be zones of defense (2-1-2). Currently working with a physics friend on wavelet analysis and prediction to be combined with MM and Elliot waves. The math gets nasty fast, but the fractal scaling seems quite simple.

MM analysis without rules appears to be a price guessing system over time at this point in my studies - perfect for scaling Phoenix.

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #263   Add to Hendrick's Reputation  Report Bad Post 

Old10-19-2006, 11:09 PM

Hendrick's Avatar

Hendrick Hendrick is online now

Senior Member

 

Join Date: Feb 2006

Posts: 469

Hendrick is on a distinguished road

Quote:

Originally Posted by daraknor

I had to consider a reply for Phoenix Boosted quite carefully. The idea of trading corresponding currencies is somewhat appealing, the idea of making money 3 times instead of making money once has a basic fundamental appeal. I basically agree with all of the statements regarding money management, entry and exit signals being a mirror image or simply not useful.

I considered a few logic problems in order to determine how useful corresponding currencies would be in practice. The premise was a 100% exact currency, a 95% corresponding currency, and a time delayed version of each. (The mirrored numbers are essentially identical since there is no cost difference executing short or long in forex.)

With a 100% exact currency traded identically, you are basically taking 2 lots. There are a few differences: relative interest rates may be lower on one pair and increase or decrease swap costs, the pip spread on one currency pair could be lower than another, the dealer desk may not skew your results on minor pairs. (Time delays are treated separately)
Results for 100% exact:
If a trending move is made, and there are several 100% equivalent currencies to select, by all means choose the currency pair with the least swap cost.
If a quick exist position is taken, choose the currency pair with the least pip spread. (broker specific in some situations)

The second trading rule with a 1 pip spread would save 2 pips round trip. Average 10 trades per month where the strategy could be used and you just earned another 20 pips per month by executing the same trade differently.

At 95% correlation, each market needs to be evaluated separately for price, indicators, in addition to the calculations done above. If there is no time delay, then this is the real world that you trade in, with additional criteria that the 100% ideal doesn't account for. The exit, stop, trailing stop, etc all need to be adjusted. If there is a compelling reason on swap or pip spread, I would probably do this - but that data is all broker specific.

Lastly, time delays. If a news events hits one market at 9:30am and there is a movement at 9:30am one direction, trading in a corresponding currency may have lower volume, lower slippage, and similar movement. Just a thought, it would take a lot of research to verify this.


Hi Daraknor!

Thanks a lot for yor contribution. I've added your "article" to my list of "things to be investigate" (it's quite a list now!).

Reply With Quote

del.icio.us   » digg   » Reddit

  #275   Add to Hendrick's Reputation  Report Bad Post 

Old10-21-2006, 02:18 AM

Hendrick's Avatar

Hendrick Hendrick is online now

Senior Member

 

Join Date: Feb 2006

Posts: 469

Hendrick is on a distinguished road

Quote:

Originally Posted by cucurucu

Hi Hendrick

Let's take it step by step:

1.Dynamic SL. I always set SL to entry price (break even) when the profit reaches 50% of TP. I think we should start this way. It has two benefits: it eliminates some loses and makes room for new trades.

2.Close trades after 48 hours no matter if the trade is in profit or in loss.

3.NEW signal. Regarding closing: I think you should leave the EA as it is. This is the basic principle of counter-trend trading: take the oposite direction of the trend and wait for reversal. We have to "wait for reversal" and NOT close the trade.
As for the opening aditional trades I vote for it.
Same Direction: buy only if the price is lower and sell only if the price is higher (first trade is on floating loss).
Opposite direction: We could open an opposite trade and still get the profit for both trades because the SL is much bigger than the TP.

4.Currency Correlation. I was using a very good system which was based on correlation. It started to lose in the last months because correlations are geting more and more messy. Please see : http://www.dailyfx.com/story/charting_center/fx_correlations/FX_Correlations__September___How_Do_1159796740400. html.

EURUSD and GBPUSD had a 66% correlation in september. This is ridiculous. Those pairs used to be 97% correlated. I say forget the correlation. It's too risky.

I think 1,2 & 3 will improve this EA significantly. What do you think?

Good luck in the Championship!


Hi Cucuru!

1 Close trades after 48 hours no matter if the trade is in profit or in loss.
3 We have to "wait for reversal" and NOT close the trade.

It seems to me that these 2 are contradictory. Or am I missing something?

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #276   Add to HerbertH's Reputation  Report Bad Post 

Old10-21-2006, 03:54 AM

HerbertH's Avatar

HerbertH HerbertH is offline

Junior Member

 

Join Date: May 2006

Posts: 26

HerbertH is on a distinguished road

Quote:

Originally Posted by Hendrick

Hi Cucuru!

1 Close trades after 48 hours no matter if the trade is in profit or in loss.
3 We have to "wait for reversal" and NOT close the trade.

It seems to me that these 2 are contradictory. Or am I missing something?


I like Cucuru's No. 1 and 2 but would like to make the No 1 rule a bit stricter.
Not by waiting for a % of profit but also by making it a timing event.

Define 2 period settings:
- 1st period (a kind of grace period) after which a trade will be closed as soon as it is without a loss.
Technically by changing the TP setting to its price on entry (+spread?)
When this period has been reached, trades that are in profit will be closed immediately, trades not yet in profit,
will have time upto the next period to reach the breakeven point.

- 2nd period after which the trade will be closed, regardless of its profit or loss status.

Herbert

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #277   Add to Hendrick's Reputation  Report Bad Post 

Old10-21-2006, 05:49 AM

Hendrick's Avatar

Hendrick Hendrick is online now

Senior Member

 

Join Date: Feb 2006

Posts: 469

Hendrick is on a distinguished road

Quote:

Originally Posted by HerbertH

I like Cucuru's No. 1 and 2 but would like to make the No 1 rule a bit stricter.
Not by waiting for a % of profit but also by making it a timing event.

Define 2 period settings:
- 1st period (a kind of grace period) after which a trade will be closed as soon as it is without a loss.
Technically by changing the TP setting to its price on entry (+spread?)
When this period has been reached, trades that are in profit will be closed immediately, trades not yet in profit,
will have time upto the next period to reach the breakeven point.

- 2nd period after which the trade will be closed, regardless of its profit or loss status.

Herbert


Hi Herbert,

Can you work this out into a set of conditions? Something like if this then that. Well, you get the picture.

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #281   Add to Hendrick's Reputation  Report Bad Post 

Old10-21-2006, 08:02 AM

Hendrick's Avatar

Hendrick Hendrick is online now

Senior Member

 

Join Date: Feb 2006

Posts: 469

Hendrick is on a distinguished road

Quote:

Originally Posted by HerbertH

It will come down to these 2 conditions Hendrick:

- If during Checkforclose(), (OrderOpenTime+forceperiod) > currenttime; closeorder.
- If during Checkforclose(), (OrderOpenTime+graceperiod) > currenttime AND not yet modified; modify order's TP with OpenPrice+/-spread.

----------------------------------------------
Inserted in the exsiting Phoenix code it could look something like:

Code:

external int PeriodGrace =  86400; // 24Hours
external int PeriodForce = 172800; // 48Hours
 
..........
 
void  CheckForClose()  // Existing sub
{...
   for(int i=0;i<OrdersTotal();i++)
      OrderSelect()...
      ......
 
      If((OrderOpenTime() + PeriodForce) > Time[0])
        {
           OrderClose(OrderTicket(),OrderLots(),Ask,3,Red)
           break;
        }
 
      if(OrderType() == OP_BUY)
        {
            If((OrderOpenTime() + PeriodGrace) > Time[0] && (OrderTakeProfit > OrderOpenPrice+(ask-bid)))
            {
               OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderOpenPrice()+(ask-bid),0,GreenYellow);
               break;
            }
        }
 
      if(OrderType() == OP_SELL)
        {
            If((OrderOpenTime() + PeriodGrace) > Time[0] && (OrderTakeProfit > OrderOpenPrice+(ask-bid)))
            {
               OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderOpenPrice()-(ask-bid),0,GreenYellow);
               break;
            }
        }
     }
.....
.....
}


Regards,
Herbert


You're the man Herbert! Thanks a lot. Will test this.

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #282   Add to HerbertH's Reputation  Report Bad Post 

Old10-21-2006, 08:22 AM

HerbertH's Avatar

HerbertH HerbertH is offline

Junior Member

 

Join Date: May 2006

Posts: 26

HerbertH is on a distinguished road

Period values


Quote:

Originally Posted by Hendrick

You're the man Herbert! Thanks a lot. Will test this.


On 2nd thought Hendrick, maybe it's more practical to specify these periods in Hours instead of Seconds. Internally multiplying by 3600 will prevent the headache when doing it manually in the experts settings window.

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #289   Add to daraknor's Reputation  Report Bad Post 

Old10-22-2006, 11:36 AM

daraknor's Avatar

daraknor daraknor is offline

Senior Member

 

Join Date: Oct 2006

Posts: 133

daraknor is on a distinguished road

I am a little confused what direction Hendrick wants to take this EA. My first take on this EA was that it works in a ranging market with a few indicators make consistent profits on regular movements. I want a few ranging market EA (at least two) to run concurrently. This must be complemented by a successful trending EA. I also want a news spike or news reversal EA because they can make a big splash, and I would money manage the events. The big criteria for inclusion is: profit in their specialty, not loosing big in trending markets.

This latest move on additional bids on profitable trades sounds like a way to convert Phoenix into a trending EA. It wouldn't actually recognize the trends, it would assume that every profit could be a trend and place a (slightly under) even bet that this is the case. I haven't looked at the resulting data, but I would assume the balance would spike up and down after successful trades. The balance may go up, but the concept seems cross purposes. The balance will definitely go up faster in trending markets, but that is 20% of the time right?

If Phoenix wants to do both trending and ranging markets, then the trades should simply be evaluated separately, the take profit and stop losses should be separate, maybe the indicators should be separate.

I love a lot of the features in Phoenix, the money management is great

One trading strategy that may work with Phoenix is enter simultaneous trades. 50-80% of the trade does take profit to cover any potential loss (or whatever level you desire). 20-50% of the take profit is a trailing stop, that takes advantage of any market runup. The original money management scheme was designed for a 2:1 Profit/Loss and worked very well at a 50% win ratio. Profits at 33% win ratio.

In contrast, a 1:2 Profit/Loss that Phoenix currently has requires a 66% win ratio to just break even. Of course this doesn't take into account drawdown or increasing lot sizes... but the way Phoenix accounts for those features will simply improve the overall execution and profitability.

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #296   Add to scout's Reputation  Report Bad Post 

Old10-22-2006, 10:10 PM

scout's Avatar

scout scout is offline

Junior Member

 

Join Date: Oct 2006

Posts: 20

scout is on a distinguished road

Mr Hendrick, i totally agree on your time-window idea. if a trade lasts too long, the open-trade signal may lose it's effect and the trade may become a tossing coin gamble or something like that. But i think looking for ways to improve success rate is better than "scout trade" because "scout trade" may be more risky.

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #313   Add to daraknor's Reputation  Report Bad Post 

Old10-23-2006, 04:17 PM

daraknor's Avatar

daraknor daraknor is offline

Senior Member

 

Join Date: Oct 2006

Posts: 133

daraknor is on a distinguished road

Thanks for all of your hard work Hendrick! Congrats on going back into top 3 as well. I agree with others that sashken might take a sudden plunge. His posted code does have a stop limit, but I read in an interview he didn't have one. Odd?

I'm very excited about Phoenix, and very glad that it is working so well. Doubling your money in under a month is excellent! (looking at championship data) Doing that 6 months straight would turn 10k into 640k.

My concern is that after several months, the market may change and there would be susceptibilities, weaknesses in a different market. Opening a new trade on a new signal is great, but (if I understand correctly) turning fluctuations into trends automatically could be dangerous.

I like categorizing things in my own head, and I'm not sure what direction you want to take Phoenix. As long as you know, then great! My understanding your motivation isn't necessary.

I will be looking for lagging corresponding currencies, USDCHF and EURUSD are too closely paralleled in the major markets to be bid on if you have any spread at all. Normall they follow 1-3 pips apart, and sometimes one currency lags behind the other by as much as 3 minutes. Since I was looking at broker data, this could simply be an artifact of my broker and not the Level 2 market.

Another possible contribution: I have made historical news data in a file read into an array. Since the news information is released each and the expected impact is ranked, we could program an EA to look for "no trade times" specific to a currency. Since major news releases alter technical trading so much, this may create a more stable currency growth. News data sorted low/med/high, and by currency code. It has a long way to go before it can be included in live EA, but it should be useful for manual trading/backtesting now.

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #322   Add to fikko's Reputation  Report Bad Post 

Old10-24-2006, 09:52 AM

fikko fikko is online now

Senior Member

 

Join Date: May 2006

Posts: 134

fikko is on a distinguished road

Time Filter with Phoenix


Hi Hendrick,

Thinking another way to improve Phoenix.... is using time filter. so far I test it with ignoring trading on 22:00 GMT will a bit increase profit on backtest for both GBP/JPY and USD/JPY.

Also perhaps news hours, we have to stop trading.....

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

 

  #331   Add to Hendrick's Reputation  Report Bad Post 

Old10-25-2006, 09:15 AM

Hendrick's Avatar

Hendrick Hendrick is offline

Senior Member

 

Join Date: Feb 2006

Posts: 469

Hendrick is on a distinguished road

Quote:

Originally Posted by jwhite1319

Great Job on the research toward version 5.0. Here is a suggestion for a scaling strategy:
When a trade entry is called, divide your lot size by 3 and enter 3 trades,
1 trade will have target of .5 times profit target,
1 trade at 1.0 times profit target ,
1 trade at 1.5 times the profit target.

When Trade 1 closes with profit at .5X, Trade 2 and Trade 3 move stop loss to break even.

When Trade 2 closes with profit at 1.0X, Trade 3 moves stop loss to .5x level

Trade 3 closes at 1.5 x profit.

This gives you the same amount of profit while minimizing the downside risk and locking in profit along the way. This is just a straw man suggestion to think about how to scale your lot size and minimize risk.


Interesting. I'm going to back test this. Will let you know the results next week. Thanks.

Reply With Quote

del.icio.us   » digg   » Reddit


 

  #334   Add to Hendrick's Reputation  Report Bad Post 

Old10-25-2006, 09:31 AM

Hendrick's Avatar

Hendrick Hendrick is offline

Senior Member

 

Join Date: Feb 2006

Posts: 469

Hendrick is on a distinguished road

Quote:

Originally Posted by daraknor

Thanks for all of your hard work Hendrick! Congrats on going back into top 3 as well. I agree with others that sashken might take a sudden plunge. His posted code does have a stop limit, but I read in an interview he didn't have one. Odd?

I'm very excited about Phoenix, and very glad that it is working so well. Doubling your money in under a month is excellent! (looking at championship data) Doing that 6 months straight would turn 10k into 640k.

My concern is that after several months, the market may change and there would be susceptibilities, weaknesses in a different market. Opening a new trade on a new signal is great, but (if I understand correctly) turning fluctuations into trends automatically could be dangerous.

I like categorizing things in my own head, and I'm not sure what direction you want to take Phoenix. As long as you know, then great! My understanding your motivation isn't necessary.

I will be looking for lagging corresponding currencies, USDCHF and EURUSD are too closely paralleled in the major markets to be bid on if you have any spread at all. Normall they follow 1-3 pips apart, and sometimes one currency lags behind the other by as much as 3 minutes. Since I was looking at broker data, this could simply be an artifact of my broker and not the Level 2 market.

Another possible contribution: I have made historical news data in a file read into an array. Since the news information is released each and the expected impact is ranked, we could program an EA to look for "no trade times" specific to a currency. Since major news releases alter technical trading so much, this may create a more stable currency growth. News data sorted low/med/high, and by currency code. It has a long way to go before it can be included in live EA, but it should be useful for manual trading/backtesting now.


Hi Drakanor,

Indeed very interesting ideas about incorporated these news event in Phoenix. On the other hand I've seen the Contest version of Phoenix reacting very well on price movements after big News Events!

Reply With Quote

del.icio.us   » digg   » Reddit

 

 

Old10-25-2006, 09:31 AM

Hendrick's Avatar

Hendrick Hendrick is offline

Senior Member

 

Join Date: Feb 2006

Posts: 469

Hendrick is on a distinguished road

Quote:

Originally Posted by daraknor

Thanks for all of your hard work Hendrick! Congrats on going back into top 3 as well. I agree with others that sashken might take a sudden plunge. His posted code does have a stop limit, but I read in an interview he didn't have one. Odd?

I'm very excited about Phoenix, and very glad that it is working so well. Doubling your money in under a month is excellent! (looking at championship data) Doing that 6 months straight would turn 10k into 640k.

My concern is that after several months, the market may change and there would be susceptibilities, weaknesses in a different market. Opening a new trade on a new signal is great, but (if I understand correctly) turning fluctuations into trends automatically could be dangerous.

I like categorizing things in my own head, and I'm not sure what direction you want to take Phoenix. As long as you know, then great! My understanding your motivation isn't necessary.

I will be looking for lagging corresponding currencies, USDCHF and EURUSD are too closely paralleled in the major markets to be bid on if you have any spread at all. Normall they follow 1-3 pips apart, and sometimes one currency lags behind the other by as much as 3 minutes. Since I was looking at broker data, this could simply be an artifact of my broker and not the Level 2 market.

Another possible contribution: I have made historical news data in a file read into an array. Since the news information is released each and the expected impact is ranked, we could program an EA to look for "no trade times" specific to a currency. Since major news releases alter technical trading so much, this may create a more stable currency growth. News data sorted low/med/high, and by currency code. It has a long way to go before it can be included in live EA, but it should be useful for manual trading/backtesting now.


Hi Drakanor,

Indeed very interesting ideas about incorporated these news event in Phoenix. On the other hand I've seen the Contest version of Phoenix reacting very well on price movements after big News Events!

Reply With Quote

del.icio.us   » digg   » Reddit

 

 

Old10-25-2006, 08:46 PM

daraknor's Avatar

daraknor daraknor is online now

Senior Member

 

Join Date: Oct 2006

Posts: 133

daraknor is on a distinguished road

I'm working on a file based news plotter, and from here it wouldn't be too hard to include/omit news events. It is supposed to be released under a closed license, but I'm either considering ditching my business partner or figuring out a way for Phoenix to use my work. The QPL public license may satisfy my business partner, but he really wants to charge per account. He even wants to charge by the month for the file version, but I completely rejected that. We are having traditional 'programmer vs marketing' woes.

A file based news service I see as valuable, but has an overhead management annoyance (for provider and user) of converting news events into the proper format, and releasing them each week. With this inherent limitation a QPL open source license may be something I can sell to both sides. (my opinion of QPL: free to use, open source, you can call it as a library, but if you sell a product that uses it you need to license the software.)

I want to help phoenix (and other open source EAs) handle news events well at no cost. My main desktop OS is linux, and I firmly believe in open source. I also believe I need to eat. Characterizing things, this would be cathedral trying to interface with the bazaar. I want to help, but I'm not sure if I can satisfy everyone. Ideally, the autoupdated version will have the same API as the file based version, and I can give the file based version away free of charge with no restrictions- but that is a few weeks/months away.

That said, I would like to know how flexible Hendrick is and what he would want to include third party code. I planned on using code similar to the (more common) time filter.

Reply With Quote

del.icio.us   » digg   » Reddit


 

  #355   Add to fikko's Reputation  Report Bad Post 

Old10-27-2006, 07:59 AM

fikko fikko is online now

Senior Member

 

Join Date: May 2006

Posts: 134

fikko is on a distinguished road

New TakeProfit and StopLoss for USDJPY


Hi Hendrick,

I just found a NEW BEST setting for USDJPY.

Take Profit = 84
Stop Loss = 84
Trailing Stop = 35

Tested with risk=0.3, Data May-October 2006

This will increase the profit from USD 114,433 to USD 345,913 (3 times)
Increase the winning probability from 83% to 89%
Profit factor increased from 1.54 to 6.17
Maximum Drawdown reduced from 53% to 22%

I try to apply the same setting for GBPJPY, but it doesn't work better than your setting.

So this is a very good result. You can try it.

If other people want to do testing on this new setting, you must go into the code of Phoneix, Line 122 (USDJPY) and change TakeProfit, StopLoss and TrailingStop.

Attached Thumbnails

Click image for larger version

Name:	StrategyTester USDJPY 4284.gif
Views:	22
Size:	5.9 KB
ID:	17604 Click image for larger version

Name:	StrategyTester USDJPY Better 8484.gif
Views:	32
Size:	5.3 KB
ID:	17606  

Attached Files

File Type: htm

StrategyTester USDJPY 4284.htm (48.7 KB, 24 views)

File Type: htm

StrategyTester USDJPY Better 8484.htm (426.6 KB, 40 views)

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #470   Add to Hendrick's Reputation  Report Bad Post 

Old11-04-2006, 03:32 AM

Hendrick's Avatar

Hendrick Hendrick is offline

Senior Member

 

Join Date: Feb 2006

Posts: 469

Hendrick is on a distinguished road

Quote:

Originally Posted by saltcafe

Me again ... I wanted to ask you about the LotsOptimized function. I've noticed that it hasn't changed much since last version, still based on AccountFreeMargin().

What I have been thinking about is what are you thoughts about making it based on AccountEquity()?

If you trade this EA on the full set of currencies then you may have up to 12 orders open (in v4.2). No objections to that, in fact it's quite good as it gives you diversification over the pairs, and when there is no major market moves then orders come and go and the lot size remains fairly constant between orders. The margin remains at around 150%-200%. However when you get major days like NFP then the market swings wildly and it make take out your half of your orders and all of a sudden your margin jumps up to 500%-700% and then when you take on new orders you unnecessarily take on larger lot sizes (larger risk) when your account hasn't actually grown in equity to justify a larger position. Now if your orders actually TP then your are sweet, but if your orders SL, then you are loosing equity unnecessarily which you wouldn't have if you based your MM on equity. This behavior of the EA is especially apparent when you start up with a clean account where your margin is maximum because you have no open orders.

(That's the reason for me wanting to turn off MM in my previous post)

What do you think?

This would also mean that your MaximumRisk setting would actually reflect the account value, which is what you had probably intended?

Time for me to hit the sack ... it's way past my bed time!


Hi Salty!

Yes, I think your idea makes sense. Anyone else has opinion about this?

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #481   Add to fikko's Reputation  Report Bad Post 

Old11-04-2006, 08:38 AM

fikko fikko is offline

Senior Member

 

Join Date: May 2006

Posts: 134

fikko is on a distinguished road

Number of Lots


Quote:

Originally Posted by Hendrick

Hi Salty!

Yes, I think your idea makes sense. Anyone else has opinion about this?


Dear Hendrick,

About the lot calculation for Money Management, I think if Phoenix run for USDJPY for risk 0.3 and GBPJPY for risk 0.3, then the trade amount for $10,000 account is 3 Lot for each. Currently Phoenix 5 doesn't open the same lot for second trade. It is true, it is not based on free margin.

But there is one thing should be taken into consideration is Leverage.

I copy and paste the code from Cyberia EA, which is actually quite good in determining number of lots open. You can place Phoenix into many Currencies, but perhaps only 2 order open at the same time. (SymbolCounts=2)

PHP Code:

= (AccountBalance()* Risk AccountMargin()) * AccountLeverage() / 
                (SymbolsCount OrdersTotal()); 


The code is using OrderTotal(), however this may need to be changed, because Phoenix may open 5 trades for 1 currency!!

And I think you may need more "Risk" variables for each of classic, double trade and 123.

PHP Code:

int CyberiaLots()
  {
   GetMarketInfo();
   // Sum of the calculation
   double S;
   // Cost of the lot
   double L;
   // Lot quantity
   double k;
   // Cost of one pip
   if( AutoLots == true )
     {
       if(SymbolsCount != OrdersTotal())
         {
           = (AccountBalance()* Risk AccountMargin()) * AccountLeverage() / 
                (SymbolsCount OrdersTotal());
         }
       else
         {
           0;
         }
       // We check, does currency appear to be EURUSD?
       if(StringFindSymbol(), "USD") == -1)
         {
           if(StringFindSymbol(), "EUR") == -1)
             {
               0;
             }
           else
             {
               iClose ("EURUSD"00);
               if(StringFindSymbol(), "EUR") != 0)
                  {
                  /= Bid;
                  }
             }
         }
       else
         {
           if(StringFind(Symbol(), "USD") != 0)
             {
               /= Bid;
             }
         }
       /= ModeLotSize;
       -= ModeMinLot;
       /= ModeLotStep;
       NormalizeDouble(S0);
       *= ModeLotStep;
       += ModeMinLot;
       Lots S;
       if (Lots>MAXLots){ Lots=MAXLots; }
       if(ShowLots == True)
           Print ("Lots:"Lots);
     }
   return (0);
  }




int GetMarketInfo()
  {
   ModeLow MarketInfo(Symbol(), MODE_LOW);
   ModeHigh MarketInfo(Symbol(), MODE_HIGH);
   ModeTime MarketInfo(Symbol(), MODE_TIME);
   ModeBid MarketInfo(Symbol(), MODE_BID);
   ModeAsk MarketInfo(Symbol(), MODE_ASK);
   ModePoint MarketInfo(Symbol(), MODE_POINT);
   ModeDigits MarketInfo(Symbol(), MODE_DIGITS);
   ModeSpread MarketInfo(Symbol(), MODE_SPREAD);
   ModeStopLevel MarketInfo(Symbol(), MODE_STOPLEVEL);
   ModeLotSize MarketInfo(Symbol(), MODE_LOTSIZE);
   ModeTickValue MarketInfo(Symbol(), MODE_TICKVALUE);
   ModeTickSize MarketInfo(Symbol(), MODE_TICKSIZE);
   ModeSwapLong MarketInfo(Symbol(), MODE_SWAPLONG);
   ModeSwapShort MarketInfo(Symbol(), MODE_SWAPSHORT);
   ModeStarting MarketInfo(Symbol(), MODE_STARTING);
   ModeExpiration MarketInfo(Symbol(), MODE_EXPIRATION);
   ModeTradeAllowed MarketInfo(Symbol(), MODE_TRADEALLOWED);
   ModeMinLot MarketInfo(Symbol(), MODE_MINLOT);
   ModeLotStep MarketInfo(Symbol(), MODE_LOTSTEP);

   return (0);
  } 

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #484   Add to Hendrick's Reputation  Report Bad Post 

Old11-04-2006, 09:47 AM

Hendrick's Avatar

Hendrick Hendrick is offline

Senior Member

 

Join Date: Feb 2006

Posts: 469

Hendrick is on a distinguished road

Quote:

Originally Posted by fikko

Dear Hendrick,

About the lot calculation for Money Management, I think if Phoenix run for USDJPY for risk 0.3 and GBPJPY for risk 0.3, then the trade amount for $10,000 account is 3 Lot for each. Currently Phoenix 5 doesn't open the same lot for second trade. It is true, it is not based on free margin.


[/php]


Hi Fikko!

Please give me some time to think this over. Your contribution is much appreciated!

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #498   Add to Hendrick's Reputation  Report Bad Post 

Old11-05-2006, 01:00 AM

Hendrick's Avatar

Hendrick Hendrick is offline

Senior Member

 

Join Date: Feb 2006

Posts: 469

Hendrick is on a distinguished road

Quote:

Originally Posted by HerbertH

Hendrick,

May I suggest to have the code changed to set Phoenixmode=1, 2 or 3 instead of the 3 booleans for mode switching, which can be set to true at the same time by accident or without knowing?

Regards


Great idea Herbert! Thanks.

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #506   Add to lgvh's Reputation  Report Bad Post 

Old11-05-2006, 08:38 AM

lgvh lgvh is offline

Junior Member

 

Join Date: Oct 2005

Location: Costa Rica

Posts: 5

lgvh is on a distinguished road

Cool


Quote:

Originally Posted by Hendrick

An updated version of Phoenix 5 (version 5.6.02).

- MicroAccount was still not working. Changed the code as suggested by lgvh.

Manual for Phoenix is updated.

The modifications I suggest had been tested with the competition version, now I review in full the new code, here follows the necesary modifications for thes new version:

1- There is some compatibility problem with the variable name "MicroAccount" with the compiler, I rename it to "Micro_Account" (must be done in all code)

2- In addition to the original sugested corrections it is necesary to change

int CheckOpenTradeMode123()
{
int Signal = 0, err = 0, total = OrdersTotal();
double lots123 = NormalizeDouble(LotsOptimized()/3,1);
if(lots123 < 0.1) {lots123=0.1;}

to

int CheckOpenTradeMode123()
{
int Signal = 0, err = 0, total = OrdersTotal();
double lots123 = NormalizeDouble(LotsOptimized()/3,1);
if(lots123 < 0.1 && Micro_Account==false) {lots123=0.1;}
if(lots123 < 0.01 && Micro_Account==true) {lots123=0.01;}

Now tested with Real Trader (Metatrader from www.RealTrader.lv)

I'm sorry to post the corrections without test the new version , I just saw the LotsOptimized() function that was the same (with the exception of the change of the variable name AccountIsMicro) and I posted in a hurry the code that worked for the previous version. Excuse my English, hope you understand

Reply With Quote

del.icio.us   » digg   » Reddit

 

 

  #509   Add to Hendrick's Reputation  Report Bad Post 

Old11-05-2006, 08:57 AM

Hendrick's Avatar

Hendrick Hendrick is offline

Senior Member

 

Join Date: Feb 2006

Posts: 469

Hendrick is on a distinguished road

Smile


Quote:

Originally Posted by fikko

Yes Hendrick,

It is true that Phoenix 5 can open up to 5 trades at once, if we switched on all the modes. But I guess it is not tested yet (?)

However I like when seeing combination of the modes, compare to combination of the currency pair. Seeing your success trade on championship, I think better to concentrate on USDJPY rather than concentrating on other pairs.

See this result? it is an amizing Phonex 5, can turn $1000 to $1 million within 6 months of trade. I am using mode 1 and mode 3.

The risk is 0.3, using 2 modes it will consume 60% of the free margin.

It is very great in backtest, but Let's see how it perform in forward test.


Well Fikko. So you've just discovered how to become a millionaire in 6 months with Phoenix. Thought I could keep this a secret for myself .

Problem is, I just changed the code in version 5.6.02 to prevent this. So what should I do? Change it back to the old settings or what? Anyone?

Reply With Quote

del.icio.us   » digg   » Reddit


 

  #510   Add to SloForeX's Reputation  Report Bad Post 

Old11-05-2006, 09:00 AM

SloForeX SloForeX is offline

Member

 

Join Date: Sep 2006

Posts: 34

SloForeX is on a distinguished road

make another mode that will use all 3 modes at the same time or something, if this is trully useful.

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #513   Add to Hendrick's Reputation  Report Bad Post 

Old11-05-2006, 09:13 AM

Hendrick's Avatar

Hendrick Hendrick is offline

Senior Member

 

Join Date: Feb 2006

Posts: 469

Hendrick is on a distinguished road

Quote:

Originally Posted by lgvh

When I use MicroAccount=true; and make test Print("MicroAccount=", MicroAccount); , the result is 0 (=false) . The test was done inside LotsOptimized() function. Once made the name change to Micro_Account, every thing works fine, without any other modification.

Maybe is a reserved (not documented) word, I don't know.


This is very, very weird!! To play it safe I will change the name of the variable. Thanks!

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #515   Add to HerbertH's Reputation  Report Bad Post 

Old11-05-2006, 02:24 PM

HerbertH's Avatar

HerbertH HerbertH is offline

Junior Member

 

Join Date: May 2006

Posts: 26

HerbertH is on a distinguished road

Quote:

Originally Posted by Hendrick

Well Fikko. So you've just discovered how to become a millionaire in 6 months with Phoenix. Thought I could keep this a secret for myself .

Problem is, I just changed the code in version 5.6.02 to prevent this. So what should I do? Change it back to the old settings or what? Anyone?


Hendrick,
Since I seem to be the one that "persuaded" you to make this change, let me suggest how to deal with this while still using the new PhoenixMode variable.
(As long as you agree it's worth to use combined modes?!)

For normal usage, the new single variable is still the best option, so:
Leave the variable as it is right now: 1,2 and 3 for each of the 3 modes.


For the daredevils who want to experiment implement the following:
Just add in the the code to recognise 3 new values (in fact 3 bits):
16 (now also meaning mode1)
32 (now also meaning mode2)
64 (now also meaning mode3)
and any combinations of these values (e.g: 16+64=80 meaning mode1 + mode3)

Sounds complicated but you only have to change 3 lines of code:

..
if(PhoenixMode==1 || (PhoenixMode & 16)) //Phoenix Classic
..
if(PhoenixMode==2 || (PhoenixMode & 32)) //Phoenix Second Trade
..
if(PhoenixMode==3 || (PhoenixMode & 64)) //Phoenix 123
..


I hope this helps.
Regards.

Reply With Quote

del.icio.us   » digg   » Reddit

 

 

  #521   Add to blucky's Reputation  Report Bad Post 

Old11-05-2006, 06:21 PM

blucky blucky is offline

Junior Member

 

Join Date: Apr 2006

Posts: 2

blucky is on a distinguished road

I want to contribute.
Maybe this could help the issue, no matter it's micro or not.

Code:

if(lot<MarketInfo(Symbol(),MODE_MINLOT)) lot=MarketInfo(Symbol(),MODE_MINLOT);
if(lot>MarketInfo(Symbol(),MODE_MAXLOT)) lot=MarketInfo(Symbol(),MODE_MAXLOT);

Reply With Quote

del.icio.us   » digg   » Reddit

 

 

  #587   Add to aegis's Reputation  Report Bad Post 

Old11-07-2006, 04:34 PM

aegis aegis is online now

Junior Member

 

Join Date: Oct 2006

Posts: 25

aegis is on a distinguished road

Quote:

Originally Posted by JanusTrading

After having Phoenix running on 2 Demo accounts here is what happened:

1.Alpari Demo opens trades, which IBFX does not.
2.In both platforms in Mode 3 only, standard settings, simultanously 3 trades are opened.

Seek help since i want to put Phoenix on a real money account next week and will post statements here.
But this makes no sense, if one Broker works the other doesnt.

Any mistake i make here?

Janus

I had a similar problem, and I have an idea on how to solve the problem, but it would require some programming. The system appears to work best on an Alpari demo so you have to write some type of program that opens/closes the trades on a different platform after you get a signal from Alpari.

For example, you get a long signal at 119.00 and a trade is opened on your Alpari demo account. You also have a live account with IBFX. As soon as the trade is entered on the Alpari demo, the program sends the same signal to open a trade at the market price on the IBFX account. When the Alpari demo closes the trade, the IBFX account will then close the trade at the market price.

Reply With Quote

del.icio.us   » digg   » Reddit

 

 

  #612   Add to Hendrick's Reputation  Report Bad Post 

Old11-08-2006, 11:38 AM

Hendrick's Avatar

Hendrick Hendrick is online now

Senior Member

 

Join Date: Feb 2006

Posts: 470

Hendrick is on a distinguished road

Quote:

Originally Posted by bertbin

My modest contribution :
in mode 3, you have 3 trade opened at the same time
and sometimes first TP is reached and price reverse....
A sort of trailing stop :
If first TP reached, SL of 2nd and 3 trade will be moved to the first TP
if second tp reached SL of third trade will be moved to second TP
Perhaps its stupid....


Not stupid at all! Thanks for your contribution!

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #643   Add to fikko's Reputation  Report Bad Post 

Old11-09-2006, 07:47 AM

fikko fikko is offline

Senior Member

 

Join Date: May 2006

Posts: 134

fikko is on a distinguished road

Another way to improve Phonenix


Hi Hendrick,

Here is another idea to improve Phoenix. A long story I must tell.

As we all know that Phoenix run well in USDJPY. Here I forward the backtest result again. It is using TP=42, SL=84, TS=0. No Breakeven. It is same with Phoenix 4.2 settings. Risk=0.3 and DecreaseFactor=0. Testing Data: May 2006 - October 2006

The result is converting $1000 to $154,953
It has created:
buy = 47 trades with 89% win
sell = 62 trades with 79% win
and overall winning probability is up to 83%


I use the same setting, but I only allow for BUY trade. Here is the result:
buy = 79 trades with 70% win
Converting $1000 to $716 (only!!)

And when I allow SELL, the result as follow:
Sell = 83 trades with 63% win
Converting $1000 to -$912 (LOSS!!)


I am very surprised how this profit buy $716 and loss sell $912 can be a profit of $154,953.

The fact found:
(1) Phoenix has sell/buy signal = 1 or 2 signal per day.
(2) The signal doesn't execute into a trade because there is an open trade already.
(3) It is not useful to follow all the signals since the accuracy is only 70% (buy) and 63% (sell)
(4) If people do forward test, they could have different result. Everybody here is not testing with same starting time (same day same time). So everybody is going with different train. Some people got profit, some people get losses. One person can have 1,4,7,9 while others will have 2,3,6,11 etc.


Improvement Possibility:
------------------------
I think Phoenix must have DIFFERENT SETTING for BUY and SELL. For example:
Buy: We keep TP = 42 SL = 84
Sell We have new setting TP = 35 SL = 60
Not only TP/SL, but also all of these ( SMAPeriod, SMA2Bars, OSMAFast, OSMASlow, OSMASignal, Fast_Period, Slow_Period, DVBuySell, DVStayOut ) must be reconsider.

So Hendrick, if you can increase each of buy/sell with winning possibility to 80%, I believe when combining them, your Phoenix can reach 95% winning probability.

In short word: "DIFFERENT SETTINGS FOR BUY AND SELL".

Any comments from you or other people here?

Attached Thumbnails

Click image for larger version

Name:	StrategyTester USDJPY All.gif
Views:	24
Size:	5.9 KB
ID:	18561 Click image for larger version

Name:	StrategyTester USDJPY Buy Only.gif
Views:	13
Size:	6.8 KB
ID:	18563  Click image for larger version

Name:	StrategyTester USDJPY Sell Only.gif
Views:	9
Size:	5.7 KB
ID:	18566  

Attached Files

File Type: zip

StrategyTester USDJPY.zip (38.9 KB, 26 views)

 


 

  #651   Add to jwhite1319's Reputation  Report Bad Post 

Old11-09-2006, 12:18 PM

jwhite1319 jwhite1319 is offline

Junior Member

 

Join Date: Dec 2005

Posts: 18

jwhite1319 is on a distinguished road

Phoenix suggested improvements...


Hi Hendrick. I saw your posts about greed and fear and agree with everything you have said. I appreciate the work you have done on Phoenix 5 including the outstanding implementation of the 123 trade suggestion I gave you.

I would now like to feed you another suggestion and see what can be made of this one:

Lets say your indicators say it is time to enter a trade. Lets assume it is looking for a buy entry. If you look at your chart to the left of current candle, you will find the most recent support. That most recent support could be 20 pips away or 80 pips away depending on the energy of the market, but it is a clear support point. Now, if you take that support point and calculate this as the maximum risk (lets say the value is 65 pips) you would want to put your stop 3-5 pips below this point giving us lets say a 70 pips stop. This is your risk. If you then multiply your risk by .5X, 1.0X, 1.5X you can get your targets needed for your 123 trade. In this example, your limit for trade 1 would be 35 pips, for trade 2 would be 70 pips and for trade 3would be 105 pips.

I believe this type of approach to calculate the optimum stop and limit will allow your EA to respond in a much more flexible way to a very dynamic market.

I have implemented this approach in another EA I am testing and results are very promising. I have also done manual backtesting of this approach and found very amazing results in terms of how uncanny the limits are at maximizing profits related to specific market movements.

One trade entry might have a 20 pips stop with 10 pip, 20 pip and 30 pip limits and the very next trade might have 70 pip stop with 35, 70 and 105 pips limits. Very dynamic and not locked into an averaged stop and limit approach that you have to change every six months.

Please let me know if this makes sense to you. I would be glad to discuss it furthur.

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #653   Add to Pecunia non olet's Reputation  Report Bad Post 

Old11-09-2006, 03:17 PM

Pecunia non olet Pecunia non olet is offline

Member

 

Join Date: Dec 2005

Posts: 73

Pecunia non olet is on a distinguished road

Smile


Quote:

Originally Posted by jwhite1319

I believe this type of approach to calculate the optimum stop and limit will allow your EA to respond in a much more flexible way to a very dynamic market.


I like this self-adaptive idea.

You could also use Lowest Low & Highest High over a short lookback period to define the support and resistance.

- - - -

Thanks Hendrick for your great contribution and willingness to share!

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #658   Add to fikko's Reputation  Report Bad Post 

Old11-09-2006, 07:05 PM

fikko fikko is offline

Senior Member

 

Join Date: May 2006

Posts: 134

fikko is on a distinguished road

Quote:

Originally Posted by asam

I agree with Point 4, but don't understand "DIFFERENT SETTINGS FOR BUY AND SELL".


Hi Asam,

It can not be done with Phoenix 4.2 or Phoenix 5. It needs programming effort. But if we have correct setting of SELL and BUY individually with accuracy 80%, then I believe when combining into one EA, it can have 95% accuracy.

The signal should be refined / filtered. So setting must be changed. It may have 2 settings both for Sell and Buy.

This week is a good week for Phoenix...

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #669   Add to wilson1668's Reputation  Report Bad Post 

Old11-09-2006, 10:54 PM

wilson1668's Avatar

wilson1668 wilson1668 is online now

Junior Member

 

Join Date: Nov 2006

Location: Hong Kong

Posts: 20

wilson1668 is on a distinguished road

Send a message via MSN to wilson1668Send a message via Yahoo to wilson1668Send a message via Skype™ to wilson1668

Quote:

Originally Posted by fikko

Hi Hendrick,

Here is another idea to improve Phoenix. A long story I must tell.

As we all know that Phoenix run well in USDJPY. Here I forward the backtest result again. It is using TP=42, SL=84, TS=0. No Breakeven. It is same with Phoenix 4.2 settings. Risk=0.3 and DecreaseFactor=0. Testing Data: May 2006 - October 2006

The result is converting $1000 to $154,953
It has created:
buy = 47 trades with 89% win
sell = 62 trades with 79% win
and overall winning probability is up to 83%


I use the same setting, but I only allow for BUY trade. Here is the result:
buy = 79 trades with 70% win
Converting $1000 to $716 (only!!)

And when I allow SELL, the result as follow:
Sell = 83 trades with 63% win
Converting $1000 to -$912 (LOSS!!)

...............
IImprovement Possibility:
------------------------
I think Phoenix must have DIFFERENT SETTING for BUY and SELL. For example:
Buy: We keep TP = 42 SL = 84
Sell We have new setting TP = 35 SL = 60
Not only TP/SL, but also all of these ( SMAPeriod, SMA2Bars, OSMAFast, OSMASlow, OSMASignal, Fast_Period, Slow_Period, DVBuySell, DVStayOut ) must be reconsider.

So Hendrick, if you can increase each of buy/sell with winning possibility to 80%, I believe when combining them, your Phoenix can reach 95% winning probability.

In short word: "DIFFERENT SETTINGS FOR BUY AND SELL".

Any comments from you or other people here?


Hi fikko,

Just have done a statistic based on your half year back test (Excel file after unzip).

From that, for buy order, best time to open order 07:00~17:00, 18:00~20:00, 00:00~01:00.

For sell order, best time to open order 17:00~22:00, 23:00~02:00. Does it make sense?

So, is it possbile to have some add-in for Phoenix such that it will open buy order for certain period and sell order for some other period?
Sorry, I am just a newbie to MQL4!

statistic_of_win_loss_order.zip

__________________

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #670   Add to Hendrick's Reputation  Report Bad Post 

Old11-09-2006, 11:08 PM

Hendrick's Avatar

Hendrick Hendrick is offline

Senior Member

 

Join Date: Feb 2006

Posts: 470

Hendrick is on a distinguished road

Quote:

Originally Posted by wilson1668

Hi fikko,

Just have done a statistic based on your half year back test (Excel file after unzip).

From that, for buy order, best time to open order 07:00~17:00, 18:00~20:00, 00:00~01:00.

For sell order, best time to open order 17:00~22:00, 23:00~02:00. Does it make sense?

So, is it possbile to have some add-in for Phoenix such that it will open buy order for certain period and sell order for some other period?
Sorry, I am just a newbie to MQL4!

Attachment 18623


Hi,

I made similar summaries earlier for one of the previous versions of Phoenix and noticed just like you that there was a correlation between winning/loosing trades and the time the order was opened. What is your time-zone? (I'm at GMT+2). I would like to compare your results with the results I had earlier.

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #692   Add to Hendrick's Reputation  Report Bad Post 

Old11-10-2006, 05:54 AM

Hendrick's Avatar

Hendrick Hendrick is online now

Senior Member

 

Join Date: Feb 2006

Posts: 471

Hendrick is on a distinguished road

Quote:

Originally Posted by saltcafe

Hi Hendrick,

Any thoughts on the equity based idea proposed earlier? (for calculating lot sizes).

Salty.


Hi Salty!

I asked others for an opinion about your idea. No reactions so far. I will use this weekend to test your proposal. You're doing a great job in this forum Salty. Thanks.

Reply With Quote

del.icio.us   » digg   » Reddit

 

 

  #696   Add to Hendrick's Reputation  Report Bad Post 

Old11-10-2006, 06:17 AM

Hendrick's Avatar

Hendrick Hendrick is online now

Senior Member

 

Join Date: Feb 2006

Posts: 471

Hendrick is on a distinguished road

Quote:

Originally Posted by wilson1668

Hello Hendrick,

Yes, actually I have read a old document that you have mentioned the most favorite trading hours (not the one you attached).

As Fikko raised the different winning rate for buy / sell order, therefore I produced the one for buy and sell order respectively. And also want to know if a double time filter can be technically inserted in Phoenix (as a newbie to MQL4) to boost the overall successful rate.

Regards
Wilson


A double time-filter shouldn't be too difficult to incorporate in Phoenix. But before doing so there has to be something like a common consent. Anyone in favour?

Reply With Quote

del.icio.us   » digg   » Reddit

 

 

  #707   Add to daraknor's Reputation  Report Bad Post 

Old11-10-2006, 07:19 AM

daraknor's Avatar

daraknor daraknor is offline

Senior Member

 

Join Date: Oct 2006

Posts: 133

daraknor is on a distinguished road

Quote:

Originally Posted by Hendrick

A double time-filter shouldn't be too difficult to incorporate in Phoenix. But before doing so there has to be something like a common consent. Anyone in favour?

I'm in favor of having double time filters, it would also be nice if there was a boolean value checked on the side to see if trades are allowed when the time filter is set. I envision this to be a news filter, but I want to get the news data through RSS and am still hunting for a means to implement this without a DLL.

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #710   Add to alanlewis's Reputation  Report Bad Post 

Old11-10-2006, 07:41 AM

alanlewis alanlewis is offline

Junior Member

 

Join Date: Oct 2006

Posts: 10

alanlewis is on a distinguished road

Changes!!!!Changes!!!!


Hi Hendrick,

Thanks for all your work.

Congrats on the competition..

I trade part time as I own a construction company. My live account is quite healthy and have no solid reason to switch to an EA with an in excess of 12k pounds which i have traded up over 2 years.

I have been running phoenix on demo and a small live account for a few weeks.

What concerns me right now is the constant desire to try and fix phoenix when we dont give it enough time to show a decent range of results.

Mode 3 is a good idea in principal, i changed the tp/sl setting and have ran it all week on demo for an increase of $400 or so on a 10k account.

My personal gripes are :

1. The breakeven on the 2nd/ 3rd trade usually does breakeven. It would make more sense to slide the s/l up tight behind the price upon closing 1st trade.

2. The lot size on a 10k account gives a .20 lot size on the 1st trade and the second. Then with the EA it make a third trade at .10 lots. Then of course the .20 lot trade goes bad and the .10 lot trade does well. We need to fix lot sizes to allow for the max of 5 trades (3 entries per trade) at the same until equity allows a step up in lot size.

3. I changed the sl/tp to a lower setting having seen many trades go very well and make 25-30 pips and then turn around. a system to check volitility over the past 48 hours and adjust sl/tp by a percentage accordingly would take smaller moves when quite and hold out when there more movement.

I hope this helps and appeals to some and lets loose the contradictions and give the pricipals behind this EA a chance to shine or fade before we condemn it or some of its features.

SORRY for the long post hendrick.

Thankyou for all you do.

Reply With Quote

del.icio.us   » digg   » Reddit

 

 

  #721   Add to Hendrick's Reputation  Report Bad Post 

Old11-10-2006, 08:57 AM

Hendrick's Avatar

Hendrick Hendrick is online now

Senior Member

 

Join Date: Feb 2006

Posts: 471

Hendrick is on a distinguished road

Quote:

Originally Posted by HerbertH

Hendrick, because lotsize calculation is quite localized inside the code; you could implement a choice switch to calculate lots based on one or the other.

If you prefer not to do this, would opening a Poll thread to do the vote count, be an idea?

Thanks


Hi Herbert!

Very good idea about adapting Phoenix in such a way that people can choose between AccountEquity() and AccountFreeMargin(). Thanks a lot Herbert!

(Herbert is a fellow Dutchman with a lot of experience as a programmer. He helps me a lot with his ideas about changing the code of Phoenix. Herbert is Gold too me!)

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #730   Add to Hendrick's Reputation  Report Bad Post 

Old11-10-2006, 11:06 AM

Hendrick's Avatar

Hendrick Hendrick is online now

Senior Member

 

Join Date: Feb 2006

Posts: 471

Hendrick is on a distinguished road

Quote:

Originally Posted by StanP

A new function has been added to MT4 ver.199
double AccountFreeMarginCheck( string symbol, int cmd, double volume)

An example:

if(AccountFreeMarginCheck(Symbol(),OP_BUY,Lots)<=0 || GetLastError()==134) return;

to open a position:

if(.....) // in order to go LONG
{
//--- do we have enough money
if(AccountFreeMarginCheck(Symbol(),OP_BUY,Lots)<5) // if we have less than $5.00 no chance..
{
Print("position cannot be open..low equity");
return(-1);
}
//--- it is OK go LONG
ticket=OrderSend(.....);
}


The new version can be downloaded from: http://www.metaquotes.ru/files/mt4setup.exe


Great Stan. I didn't had the opportunity so far to test this new release. Thanks a lot for pointing out this new function. How I love MT4!

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #754   Add to seb's Reputation  Report Bad Post 

OldYesterday, 12:58 AM

seb seb is offline

Junior Member

 

Join Date: Aug 2006

Posts: 6

seb is on a distinguished road

Hello Mr Phoenix, and the others. Thanks to everybody for the work.
I use for real Phoenix 4, and i have backtested it a lot. But i am not so enthusiastic.
One big problem for me is that you have differents results depend on when you start the EA. Why don't you let the EA open and buy more than 1 order ?
It will validate or not the signals you have and stabilize the EA.

i have changed the start fonction to enable the EA to open a buy or sell order each time a signal occurs, and i wait 15min between 2 orders.
void start()
{
if(Bars<100 || IsTradeAllowed()==false) return;

if((CurTime()-LastTradeTime)<900) return(0); // 15min
if(CalculateCurrentOrders(Symbol())<=1000) CheckForOpen();
CheckForClose();
}

the CalculateCurrentOrders fonction return (buys+sells);
LastTradeTime=CurTime(); // each time an ordersend() is called.

I will backtest it this week, but i wait for your comments.

Reply With Quote

del.icio.us   » digg   » Reddit

 


 

  #777   Add to Hendrick's Reputation  Report Bad Post 

OldYesterday, 09:44 AM

Hendrick's Avatar

Hendrick Hendrick is online now

Senior Member

 

Join Date: Feb 2006

Posts: 471

Hendrick is on a distinguished road

Quote:

Originally Posted by daraknor

One of the things that people may not understand coming to Forex to begin with is that the *broker* dictates the price, not the market. The broker charges you with whatever price they choose. They are trading Forex at the same time, but only on the orders that don't cancel out (500 lots buy EURUSD and 400 lots sell EURUSD). If the broker isn't in the market for 100 lots, they would need to pay the traders profits out of their own pocket. They rely on a combination of tactics to make (and keep) money, including changing prices after you send in buy/sell signals, hitting SL or missing TP levels by price fixing, changing the spread, etc.

A few trading practices help, like using longer term trading. Some brokers don't allow trades that last less than 90 seconds, other brokers require 10 minutes minimum.

Brokers give different prices, and by comparing data from a few brokers I see a difference of 2-5 pips constantly. With Level 2 access (no charts or indicators) you have direct market access and can see bank and broker volume, often 6000-18000 10k lots in 2-4 seconds. These prices are *very* stable, and if I ever trade the news that is how I will do it. These prices don't vary as much as broker prices, and brokers sometimes touch market prices.

Ultimately we test demos to get good statistics for tuning Expert Agents, but we won't know true performance until we trade 5-10 lots at a time (because then the broker might actually enter the market). We can earn money in the meantime, but it is up to the broker how much, etc. Sometimes Demo data and Real data don't agree. (If anyone has real history and demo history from one broker, I will compare the data using some SQL magic... SELECT * WHERE t1.price != t2.price )

I'm going to be running a 5 broker test next week with identical settings. I had two brokers with identical settings this week and the two EA often agreed, but based on broker differences the financial reports varied on win/loss. BTW if you do look at the H1 reports please understand that you should *not* set H1 as the timeframe. I wanted to see how bad it would do (I think the main reason for the performance was the indicators using PRICE_CLOSE but Hendrick hasn't commented.)

When we talk about brokers, we are often trying to figure out how much we should trust our data. Spread is important if you do a lot of trades, but we care more about false or manipulated data messing up big trades. I'm writing EA tools to hide the TP and SL data so we can surprise the brokers and hold them to their quote without foresight on how the trades will be affected.


Hi Daraknor!

As always, a very professional post from you! But hiding the TP and SL for your broker: is this really a good idea? As we know it's not too difficult to change an EA so it hides the TP and SL to your broker. But what if you loose your connection with your broker for let's say more than 24 hours and in these 24 hours prices went up or down substantially. You could be in serious problems then because your open trades have no SL!

Reply With Quote

del.icio.us   » digg   » Reddit