Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > Suggestions for Trading Systems


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

View Poll Results: What Do You Think?
Good 622 87.98%
Bad 85 12.02%
Voters: 707. You may not vote on this poll

Reply
 
LinkBack (70) Thread Tools Display Modes
  #1101 (permalink)  
Old 09-17-2007, 09:38 AM
Administrator
 
Join Date: Sep 2005
Posts: 16,810
Blog Entries: 145
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Hi forex_for_lowlife,

Don't watch American movies too much

By the way, forex_for_lowlife is having the same IP with our famous spammer so no need to reply to him.

Last edited by newdigital; 09-17-2007 at 09:49 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1102 (permalink)  
Old 09-17-2007, 10:11 AM
Senior Member
 
Join Date: Mar 2006
Location: La Verne,CA
Posts: 556
MrPip is on a distinguished road
Quote:
Originally Posted by burn0050 View Post
Are you sure you are not talking about the code from nix (the autolot function)?

I posted the code into post 1046, which you quoted in post 1048:
http://www.forex-tsd.com/150350-post1048.html

This line:
double lotMM = ( AccountFreeMargin() * (accountRisk/100) )/( MarketInfo(Symbol(),MODE_TICKVALUE) * stopInPips );

As you see, "stopInPips" is used in the equation. This function: MarketInfo(Symbol(),MODE_TICKVALUE) returns the value of 1 pip when you have 1 lot.

Since you were a mathematical analyst, let's do some math:

For USD/JPY:
$25k free margin, with a 1.5% risk, 50 pip stop loss:
(25,000 * .015)/(8.68 * 50) = 375/434 = .86 lots

.86 lots * 8.68 = 7.47 pip value (1 pip = $7.47)
50 pips * $7.47 = $373.50 (due to rounding, not quite $375)

So, let's see what happens with a 100 pip stop loss:
(25,000 * .015)/(8.68 * 100) = 375/868 = .43 lots
.43 lots * 8.68 = 3.73 pip value (1 pip = $3.73)
100 pips * $3.73 = $373 (again, due to rounding, not quite $375)

No matter what stoploss you put in, the dollar amount risked remains constant for this size account using this risk percent. As your account size changes, so will the dollar amount risked, but the percent risked remains the same. The stoploss does not affect the percent risked, only how much currency you buy.

If you see fault with my calculations, please tell me.

Thanks,
burn0050
You are right, I used nix AutoLots function.

I now have one more change to MM. I will now add your code as well and have a switch to chose which to test.

Robert
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1103 (permalink)  
Old 09-17-2007, 11:01 AM
Senior Member
 
Join Date: Mar 2006
Location: La Verne,CA
Posts: 556
MrPip is on a distinguished road
Problem in MM function

burn0050,

There is a problem with your LotSize function that I have seen before.
It will not work with IBFX or those brokers no longer using lots. IBFX uses 1 for a minilots in a mini account while FXDD uses .1 for a minilot in a mini account. FXDD does not allow partial lots in a standard account while I believe IBFX does.

Some brokers are now using actual dollar amounts like $10000 instead of lots..

This causes problems writing MM functions in EAs.

For now I will simply post the code as is. I will work on figuring how to use your method with IBFX and update the EA for repost.

All results posted were using Nix version of AutoLots.

Robert
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1104 (permalink)  
Old 09-17-2007, 11:52 AM
Senior Member
 
Join Date: Mar 2006
Location: La Verne,CA
Posts: 556
MrPip is on a distinguished road
Ea

I know many of you are waiting for this so I am posting it now.

The next phase of development will be finding a good exit method. The current method exits on the opposite signal from the two zigzag indicators.

For MM the input for Risk should be small for Burns method and can be larger for Nix version.

I hope the other inputs are obvious. The various strings are menus to chose what you want to test.

The best results tested on GBPJPY were using the default settings.

Using 3% Risk and Burns MM method did return $8695 on $10K account with drawdown of 15%. Largest profit was 2262, largest loss 438.
Average profit was 1328, average loss was 250.

Using 4% risk and nix MM method returned $8798 with drawdown of 7.8%. Largest profit was 2602, largest loss was 512.
Average profit was 1225, average loss was 171.

Let the testing begin.

Robert
Attached Files
File Type: mq4 bouncingPipEA_mpowerV3.mq4 (27.3 KB, 373 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1105 (permalink)  
Old 09-17-2007, 11:57 AM
Senior Member
 
Join Date: Mar 2006
Location: La Verne,CA
Posts: 556
MrPip is on a distinguished road
Modificaions to EA

I am open to suggestions for removing code from the EA. If things like HA, HAS, CCI or Stochastics filters should be removed let me know. We should also work toward a single MM function.

Some of the filter indicators will be tested for exit as well. I am ecen thinking of using confirmation of arrow similar to entry rule.

That might allow some trades to reach greater profit, especially those trades that have many exit arrows after the first exit signal.

Suggestions for other exit methods are also welcome.
I will be coding a few myself.

Robert
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1106 (permalink)  
Old 09-17-2007, 12:28 PM
basza's Avatar
Senior Member
 
Join Date: Dec 2005
Posts: 146
basza is on a distinguished road
Quote:
Originally Posted by MrPip View Post
I am open to suggestions for removing code from the EA. If things like HA, HAS, CCI or Stochastics filters should be removed let me know. We should also work toward a single MM function.

Some of the filter indicators will be tested for exit as well. I am ecen thinking of using confirmation of arrow similar to entry rule.

That might allow some trades to reach greater profit, especially those trades that have many exit arrows after the first exit signal.

Suggestions for other exit methods are also welcome.
I will be coding a few myself.

Robert
Hello MrPip

I have this mm in some of my ea's. I don't know if it would help you or not but I will post it just in case:
This bit goes at the top so that the user can choose which type they want
Code:
//////
/* Here is the MM settings...look at notes...if set to 0 then ea will trade with a fixed lot size..the size specified 
   in the above "extern double Lots = 1.0;" line. Might want to change this to 0.1.
   If 1 then it will trade a fixed percentage of the account balance
   If 2 then it will use a fractional portion (not to sure on this one..must look at code again)
   If 3 then a fractional fixed size meaning 1 lot for every 500 in account or so...the 500 is set below
     in the LotsDepoForOne - i.e. How many lots for each deposit amount of = 
     
     You must play around with it..cannot remember exact settings but I likes the setting to trade 1 lot for each $xx in account.
     Easy to maintain a say 500:1 ratio with it.
  */   

extern int LotsWayChoice  = 3;    // Lot size selection: 
                                  //  0-fixed lot size, 
                                  //  1-% from deposit, 
                                  //  2-fractional proportional, 
                                  //  3-fractional fixed lot size, 
extern int LotsPercent=0;   // % from deposit 
extern int LotsDeltaDepo=500;  // factor of deposit increase 
extern int LotsDepoForOne=500;  // deposit size for 1 mini lot 
extern int LotsMax=100; // Max number of mini lots 


double ldLot;
then some of the ea code till you get to the buy and sell part and enter in the following
Code:
ldLot = GetSizeLot();
         ticket = OrderSend(Symbol(),OP_SELL,ldLot,Bid,slippage,realSL,realTP,nameEA+" - Magic: "+magicEA+" ",magicEA,0,Red); // Sell
and then the final part at the bottom of ea code

Code:
///////////////////////////////////////////////////////////////////////////////////////
// This part is the function where the lot size is calculated

double GetSizeLot() {  
  double dLot; 
  if (LotsWayChoice==0) dLot=Lots; 

  // fixed % from deposit 
  if (LotsWayChoice==1) { 
    dLot=MathCeil(AccountFreeMargin()/10000*LotsPercent)/10; 
  } 

  // fractional proportional 
  if (LotsWayChoice==2) { 
    int k=LotsDepoForOne; 
    for (double i=2; i<=LotsMax; i++) { 
      k=k+i*LotsDeltaDepo; 
      if (k>AccountFreeMargin()) { 
        dLot=(i-1)/10; break; 
      } 
    } 
  } 

  // fractional fixed 
  if (LotsWayChoice==3) { 
    dLot=MathCeil((AccountFreeMargin()-LotsDepoForOne)/LotsDeltaDepo)/10; 
  } 

  if (dLot<0.1)  dLot=0.1;
  if (dLot>LotsMax) dLot=LotsMax;
   
  return(dLot);  
  }
I hope this is of some use to anyone.
__________________
http://westauckfx.oxyrack.com/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1107 (permalink)  
Old 09-17-2007, 12:47 PM
static's Avatar
Senior Member
 
Join Date: Apr 2006
Location: 西海岸
Posts: 125
static is on a distinguished road
Quote:
Originally Posted by MrPip View Post
I know many of you are waiting for this so I am posting it now.

The next phase of development will be finding a good exit method. The current method exits on the opposite signal from the two zigzag indicators.

For MM the input for Risk should be small for Burns method and can be larger for Nix version.

I hope the other inputs are obvious. The various strings are menus to chose what you want to test.

The best results tested on GBPJPY were using the default settings.

Using 3% Risk and Burns MM method did return $8695 on $10K account with drawdown of 15%. Largest profit was 2262, largest loss 438.
Average profit was 1328, average loss was 250.

Using 4% risk and nix MM method returned $8798 with drawdown of 7.8%. Largest profit was 2602, largest loss was 512.
Average profit was 1225, average loss was 171.

Let the testing begin.

Robert
Thanks for posting this, hopefully I can give it a try this afternoon.
__________________
魑魅魍魎
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1108 (permalink)  
Old 09-17-2007, 01:56 PM
nix nix is offline
Member
 
Join Date: Aug 2006
Posts: 91
nix is on a distinguished road
Quote:
Originally Posted by MrPip View Post
burn0050,

There is a problem with your LotSize function that I have seen before.
It will not work with IBFX or those brokers no longer using lots. IBFX uses 1 for a minilots in a mini account while FXDD uses .1 for a minilot in a mini account. FXDD does not allow partial lots in a standard account while I believe IBFX does.

Some brokers are now using actual dollar amounts like $10000 instead of lots..

This causes problems writing MM functions in EAs.

For now I will simply post the code as is. I will work on figuring how to use your method with IBFX and update the EA for repost.

All results posted were using Nix version of AutoLots.

Robert
This modification of my previous AutoLot function should do the trick and takes the StopLoss value into consideration:

Code:
double AutoLots(int Risk, int StopLossInPips, double MIN_lots = 0.1, double MAX_lots = 5)
{
   int    Decimals = 0;
 
   double LotStep = MarketInfo(Symbol(), MODE_LOTSTEP);
   double LotSize = MarketInfo(Symbol(), MODE_LOTSIZE);
   double LotTickValue = MarketInfo(Symbol(), MODE_TICKVALUE);

   if(LotStep == 0.01)
      Decimals = 2;
   if(LotStep == 0.1)
      Decimals = 1;

   double LotsToRisk = ((AccountFreeMargin()*Risk)/100)/StopLossInPips;
   double Lots = StrToDouble(DoubleToStr(LotsToRisk/LotTickValue,Decimals));
  
   if (Lots < MIN_lots)
      Lots = MIN_lots;
   if (Lots > MAX_lots)
      Lots = MAX_lots;

   return(Lots);    
}
__________________
NiX
forex.home.pl

Last edited by nix; 09-17-2007 at 05:57 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1109 (permalink)  
Old 09-17-2007, 03:21 PM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,098
ElectricSavant is on a distinguished road
Thanks Mr. Pip...

Hey! I bet Don is happy...it is more convienient for him to download from here and resell it...This could be like the central meeting place!

ES
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1110 (permalink)  
Old 09-17-2007, 03:49 PM
Member
 
Join Date: Jun 2006
Posts: 42
hoss is on a distinguished road
Nice little short on the Euro this morning.
Attached Images
File Type: gif eurusd.gif (8.3 KB, 953 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
forex tsd, forex-tsd, bouncing pips, Bouncing Pip, follow the bouncing pip, Supernova, bouncing, nonlag zigzag, nonlagdot, bouncing pip ea, forex, BigBear, MrPip, signal_bars_v6, MACD-DIV, QQE_Alert_MTF_v5, signal_bars_v6.ex4, bear system forex tsd, Jacko, tsd forex, follow, mr pip

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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/suggestions-trading-systems/8728-follow-bouncing-pip.html
Posted By For Type Date
【Forex】MetaTrader PartX【CFD.&Futures】 This thread Refback 09-26-2008 04:41 PM
■テクニカルについて語ろう■Part5 This thread Refback 09-23-2008 08:07 AM
【隔離スレ】MetaTrader初心者専用3【ゆとり専用】 This thread Refback 09-21-2008 03:37 AM
??????MetaTrader????????????? - MetaTrader???Wiki This thread Refback 08-31-2008 08:27 AM
ナモハムヌハフノ ハネマ ホリム ン聿 ヤムヘ衂 ソ!! - 聿ハマヌハ ヌ矼ハマヌ趁 ヌ瞽ムネ This thread Pingback 07-13-2008 04:26 AM
・キ・ケ・ニ・爭ネ・。シ・タ。シ、ホヘ。。 This thread Refback 06-29-2008 07:05 PM
■テクニカルについて語ろう■Part5 This thread Refback 06-18-2008 01:16 PM
neamtu_victor - Viewing Profile This thread Refback 02-26-2008 06:26 PM
ハレヌ 赭硼 翔ヤム zig zag ネレ聶 聚ヌ゚ ナ !!! - ヌ瞰ンヘノ 2 - 聶バ 萇マ ホネムヌチ ヌ矼ヌ This thread Refback 02-20-2008 10:02 PM
Real Forex For TSD: Signal Service This thread Refback 02-09-2008 08:06 AM
ZigZaguri - vamist.com - Forex forums and blogs This thread Refback 02-07-2008 04:35 PM
Jacko's Forex House of Pleasure and Pain - Page 107 This thread Refback 02-06-2008 04:06 PM
Jacko's Forex House of Pleasure and Pain - Page 107 This thread Refback 02-06-2008 01:57 PM
livemarket2 / ■テクニカルについて語ろう■Part5 This thread Refback 02-06-2008 01:24 AM
Supernova GBP/JPY Mini Trend Catcher - Page 183 This thread Refback 01-28-2008 12:40 PM
【Forex】MetaTrader PartX【CFD.&Futures】 This thread Refback 01-21-2008 12:18 PM
ZigZaguri - vamist.com - Forex forums and blogs This thread Refback 01-13-2008 05:59 PM
Real Forex For TSD: Results 12/27 This thread Refback 12-30-2007 05:24 PM
ハレヌ 赭硼 翔ヤム zig zag ネレ聶 聚ヌ゚ ナ !!! - ヌ瞰ンヘノ 3 - 聶バ 萇マ ホネムヌチ ヌ矼ヌ This thread Refback 12-29-2007 08:35 PM
ハレヌ 赭硼 翔ヤム zig zag ネレ聶 聚ヌ゚ ナ !!! - ヌ瞰ンヘノ 2 - 聶バ 萇マ ホネムヌチ ヌ矼ヌ This thread Refback 12-29-2007 02:09 PM
ハレヌ 赭硼 翔ヤム zig zag ネレ聶 聚ヌ゚ ナ !!! - ヌ瞰ンヘノ 2 - 聶バ 萇マ ホネムヌチ ヌ矼ヌ This thread Refback 12-29-2007 01:31 PM
。レForex。ロMetaTrader Partュケ。レCFD.&Futures。ロ - MetaTrader、゙、ネ、畍iki This thread Refback 12-26-2007 04:03 AM
・キ・ケ・ニ・爭ネ・。シ・タ。シ、ホヘ。。 200710 This thread Refback 12-23-2007 05:51 PM
Diskuzn frum Financnik.cz :: Se Sidem o Forexu :: Indik疸ory a obchodn syst駑y