Forex



Go Back   Forex Trading > Trading systems > Martingale/Average Cost and Hedging






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
  #701 (permalink)  
Old 02-24-2008, 12:48 PM
sivach's Avatar
Senior Member
 
Join Date: Jun 2006
Posts: 108
sivach is on a distinguished road
Thanks wolfe for such a wonderful work put together in this version, overall the quality, ideas and inputs are never seen before. So, we all will do a full forward test with this and report the bugs. However, I know it is impossible to expect without any faults on it, the shell of the EA is the very important part. Hope this will be a nice EA after all corrections. SuperPower vehicle on the forex road with many controls and gadgets to play.
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
  #702 (permalink)  
Old 02-24-2008, 03:15 PM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,354
ElectricSavant is on a distinguished road
kayvan,

Being that the market is closed...could you be a bit more specific...what is it you are having trouble with...?

Could you post your setfile? and perhaps I could try and help.

ES


Quote:
Originally Posted by kayvan View Post
most of it`s options dose`t work.

may be something wrong with my stings ?



wolfe ,please help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #703 (permalink)  
Old 02-24-2008, 03:40 PM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,354
ElectricSavant is on a distinguished road
Here is my setfile for those of you interested. I broke the inputs into groupings and as wolfe refines the EA preparing it for live trading he might consider typing in gaps in the input screen with text explaining the groupings. The log-in to this IBFX Demo mini-account with 1K is below

Start_Lot_Size=0.1
Lot_Size_Increment=0.1

Long_Short_Balance=false
Balance_Weight=0.1

Double_Lotsize=true
Choose_Own_Progression=false
Trade_1=0.0
Trade_2=0.0
Trade_3=0.0
Trade_4=0.0
Trade_5=0.0
Trade_6=0.0
Trade_7=0.0
Trade_8=0.0
Trade_9=0.0
Trade_10=0.0
Trade_11=0.0
Trade_12=0.0
Trade_13=0.0
Trade_14=0.0
Trade_15=0.0
Trade_16=0.0
Trade_17=0.0
Trade_18=0.0
Trade_19=0.0
Trade_20=0.0
Max_Trades=11 Late Edit
Close_All_Max=true

Pyramid=true

Auto_Restart=true

Use_MA_Entry=false
Next_Trade=20
MA_Period=7
MA_Timeframe=60

Use_Kayvan_Method=true
Bar_Timeframe=30
Bars_Look_Back=2
EntryLag_Long=3 Late Edit
EntryLag_Short=4 Late Edit
Last_Entry_Filter=false

Use_Trailing_Stop=true
Trail_Start=6.0
TSLoss_Percent=83.4

Close_By_Percent=false
TP_Percent=5.0
SL_Percent=10.0

Close_By_Profit=99999.0
Close_By_StopLoss=99999.0

Slippage=2
Number_Of_Tries=5

Sound=true
-------------------------------------------------------------------------

Login : 1870247
Investor : cp7rmjj (read only password)
Server: InterbankFX-Demo Accounts

Last edited by ElectricSavant; 02-24-2008 at 08:07 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
  #704 (permalink)  
Old 02-24-2008, 04:06 PM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,354
ElectricSavant is on a distinguished road
wolfe,

Please excuse my numerous questions...I just want to make sure. Will this combination below give me a trail starting when the float reaches $6 bucks and exit me at $5 bucks, assuming it didn't lock in any more profit?



Use_Trailing_Stop=true
Trail_Start=6.0
TSLoss_Percent=83.4

Close_By_Profit=99999.0
Close_By_StopLoss=99999.0

ES
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
  #705 (permalink)  
Old 02-24-2008, 04:23 PM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,354
ElectricSavant is on a distinguished road
I took a slice of the setfile I am using, below in quotes, to go over this...

Trade#1: 0.1 lots
Trade#2: 0.2 lots
Trade#3: 0.4 lots
Trade#5: 0.8 lots
Trade#6: 1.6 lots
Trade#7: 3.2 lots
Trade#8: 6.4 lots
Trade#9: 12.8 lots
Trade#10: 25.6 lots

Now here is my question...Should maxtrades be set to 10...and will closeallmax exit and get flat on all the trades on the attempt to make the 11th trade?





Quote:
Start_Lot_Size=0.1
Lot_Size_Increment=0.1

Long_Short_Balance=false
Balance_Weight=0.1

Double_Lotsize=true
Choose_Own_Progression=false
Trade_1=0.0
Trade_2=0.0
Trade_3=0.0
Trade_4=0.0
Trade_5=0.0
Trade_6=0.0
Trade_7=0.0
Trade_8=0.0
Trade_9=0.0
Trade_10=0.0
Trade_11=0.0
Trade_12=0.0
Trade_13=0.0
Trade_14=0.0
Trade_15=0.0
Trade_16=0.0
Trade_17=0.0
Trade_18=0.0
Trade_19=0.0
Trade_20=0.0
Max_Trades=10
Close_All_Max=true

Last edited by ElectricSavant; 02-24-2008 at 04: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
  #706 (permalink)  
Old 02-24-2008, 04:41 PM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 816
wolfe is on a distinguished road
The first thing you can say to me after giving you this for FREE is
Quote:
Originally Posted by kayvan View Post
most of it`s options dose`t work.
kayvan, how can I help you when I don't even know what it is you tried to do?
Quote:
Originally Posted by kayvan View Post
wolfe ,please help
Did you run a back test? The market isn't even open yet.
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
  #707 (permalink)  
Old 02-24-2008, 04:49 PM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,354
ElectricSavant is on a distinguished road
wolfe,

I think this is a language problem...more than it being whining...

wolfe...let's see how kayvan responds...I really do not think that he meant anything derogatory..I think he was posting out of frustration. Try to understand that this is probably one of the most complex EA's undertaken publically in forex-tsd...I would place it in the top 10 for complexity.

Remember this is a global audience and English is not everybody's first language.

Also people talk to each other differently in various parts of the globe...wolfe I know you realize this...and I can see where the first response is the most important.

ES

P.S. I posted my setfile for all to see...but I wanted to give kayvan something to look at also without embarrassing him or putting the spotlight on him..I hope this helped.


Quote:
Originally Posted by wolfe View Post
The first thing you can say to me after giving you this for FREE is


kayvan, how can I help you when I don't even know what it is you tried to do?

Did you run a back test? The market isn't even open yet.

Last edited by ElectricSavant; 02-24-2008 at 05:04 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
  #708 (permalink)  
Old 02-24-2008, 04:56 PM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,354
ElectricSavant is on a distinguished road
I may be out of line here...

But Newdigital...needs to give the keys to the Elite section of this Forum to wolfe...wolfe has earned it and should not have to pay...we need to take care of the coders here..

Newdigital...please

ES

P.S. will someone point newdigital to this post and support the idea?

Last edited by ElectricSavant; 02-24-2008 at 05:21 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
  #709 (permalink)  
Old 02-24-2008, 05:02 PM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 816
wolfe is on a distinguished road
Quote:
Originally Posted by ElectricSavant View Post
What criteria is used to determine trend direction?

ES


If Long_Short_Balance is true, you CAN NOT choose your own progression.
Long_Short_Balance uses the Start_Lot_Size & the Lot_Size_Increment. When a trend direction change is detected and another trade signal occurs, the EA will "equalize" the long and short lot sizes (now you are fully hedged), plus it will add Balance_Weight to the side of you're new trend.
Depends if you are using MA entry, or kayvan method, pyramid true, or pyramid false.

Basically a Long_Short_Balance would happen if your last order was a short, and you just got a signal to open a long. Or the other way around of course. This would happen only if Long_Short_Balance was set to true, and ALL other lot size decisions were set to false.

Right here is what I had to code JUST to determine the next lot size in a trade progression, depending on how the user set it up.
PHP Code:
if (Double_Lotsize==false)
         {
          
Lot_Size=LastLots+Lot_Size_Increment;
         }
        if (
Double_Lotsize==true)
         {
          
Lot_Size=LastLots*2;
         }
        if (
Long_Short_Balance==true)
         {
          if (
SellLots>BuyLots)
           {
            
Lot_Size=((SellLots-BuyLots)+Balance_Weight);
           }
          else 
Lot_Size=LastLots+Lot_Size_Increment;
         }
        if (
Choose_Own_Progression==true)
        {
         if(
OTBM(Magic_Number)==1){Lot_Size=Trade_2;}if(OTBM(Magic_Number)==2){Lot_Size=Trade_3;}
         if(
OTBM(Magic_Number)==3){Lot_Size=Trade_4;}if(OTBM(Magic_Number)==4){Lot_Size=Trade_5;}
         if(
OTBM(Magic_Number)==5){Lot_Size=Trade_6;}if(OTBM(Magic_Number)==6){Lot_Size=Trade_7;}
         if(
OTBM(Magic_Number)==7){Lot_Size=Trade_8;}if(OTBM(Magic_Number)==8){Lot_Size=Trade_9;}
         if(
OTBM(Magic_Number)==9){Lot_Size=Trade_10;}if(OTBM(Magic_Number)==10){Lot_Size=Trade_11;}
         if(
OTBM(Magic_Number)==11){Lot_Size=Trade_12;}if(OTBM(Magic_Number)==12){Lot_Size=Trade_13;}
         if(
OTBM(Magic_Number)==13){Lot_Size=Trade_14;}if(OTBM(Magic_Number)==14){Lot_Size=Trade_15;}
         if(
OTBM(Magic_Number)==15){Lot_Size=Trade_16;}if(OTBM(Magic_Number)==16){Lot_Size=Trade_17;}
         if(
OTBM(Magic_Number)==17){Lot_Size=Trade_18;}if(OTBM(Magic_Number)==18){Lot_Size=Trade_19;}
         if(
OTBM(Magic_Number)==19){Lot_Size=Trade_20;}
         }
        
RefreshRates();
        
Ticket=OrderSend(Symbol(),OP_BUY,Lot_Size,Ask,Slippage,NULL,NULL,"TFX_LONG_ADDITIONAL",Magic_Number,0,Green); 
As you see it got very confusing, and it does have some limitations. Code reads left to right, top to bottom, just as you or I would.(only it does this in a nano second)

Now you can see the last decision method the code reads is this one:
PHP Code:
if (Choose_Own_Progression==true)
        { 
If Choose_Own_Progression is set to true, this is the last thing the code reads to decide which method for lot size it will use, all others that were true will not execute. Only the last one that the code read to be true.

Sorry if I just confused you more.

Last edited by wolfe; 02-24-2008 at 05:22 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
  #710 (permalink)  
Old 02-24-2008, 05:06 PM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,354
ElectricSavant is on a distinguished road
Just a thought...

Delete your include file folks...then install the new and improved 1.6...no include file needed. The opening post of this thread has your new download.

It is best just to start with a new demo....then everything is clear!

ES

Last edited by ElectricSavant; 02-24-2008 at 05:14 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
Reply

Bookmarks

Tags
Baggio, best martingale ea, digitrend_gyro, ea martingale, forex martingale, grid martingale, martingale, martingale ea, martingale ea download, martingale ea forex, martingale expert advisor, martingale forex, Martingale mt4, tfx v1_8

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
Martingale Trend EA criss73 Expert Advisors - Metatrader 4 8 11-20-2008 02:56 AM
Reversed martingale mrv Expert Advisors - Metatrader 4 6 07-26-2007 01:28 AM
Leverage for martingale frantacech Expert Advisors - Metatrader 4 0 05-22-2007 02:17 PM
Martingale EAs? icepeak Expert Advisors - Metatrader 4 5 01-18-2007 03:21 AM
Martingale EA newdigital Expert Advisors - Metatrader 3 2 05-23-2006 03:42 PM


All times are GMT. The time now is 12:10 PM.



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