Forex
Google
New signals service!

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
 
LinkBack (20) Thread Tools Display Modes
  #881 (permalink)  
Old 02-27-2008, 02:28 AM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 719
wolfe is on a distinguished road
Quote:
Originally Posted by BigBoppa View Post
Puh, i just wake up and there are 5 new pages to read!
You guys have to slow down with an old man...
Thanks for the interest BigBoppa! Please share any ideas or concerns.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #882 (permalink)  
Old 02-27-2008, 03:06 AM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 719
wolfe is on a distinguished road
Quote:
Originally Posted by ElectricSavant View Post
Entry is not correct in 1.8..

You added or subtracted when you should of done the opposite...we are getting entries at 2 pips inside the bar...or else the lookback did not lookback correctly...

ES
This is the last thing I want to be on the "same page" with, before I post the (hopefully) corrected v1_8.

Let me explain what I tried to do:

All long ordersend commands must use the ask.
PHP Code:
OrderSend(Symbol(),OP_BUY,Lot_Size,Ask,Slippage,NULL,NULL,"TFX_LONG_ADDITIONAL",Magic_Number,0,Green); 
All short ordersend commands must use the bid.
PHP Code:
OrderSend(Symbol(),OP_SELL,Lot_Size,Bid,Slippage,NULL,NULL,"TFX_SHORT_ADDITIONAL",Magic_Number,0,Red); 
When you see an arrow on a chart for an opened long order, that arrow is the ask. The ask is the price you're long order opened at.

When you see an arrow on a chart for an opened short order, that arrow is the bid. The bid is the price you're short order opened at.

At least this is how I understand things.

So, in the code all the entry possibilities for a long I used the Ask:
PHP Code:
if (((Pyramid==true)&&(Use_MA_Entry==false)&&(Ask >= Next_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==false))||
     ((
Pyramid==false)&&(Use_MA_Entry==false)&&(Ask <= Next_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==false))||
     ((
Pyramid==true)&&(Use_MA_Entry==false)&&(Ask >= Next_Buy)&&(Ask>Last_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true))||
     ((
Pyramid==true)&&(Use_MA_Entry==false)&&(Ask >= Next_Buy)&&(OTL(Magic_Number)==0)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true))||
     ((
Pyramid==false)&&(Use_MA_Entry==false)&&(Ask <= Next_Buy)&&(Ask<Last_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true))||
     ((
Pyramid==false)&&(Use_MA_Entry==false)&&(Ask <= Next_Buy)&&(OTL(Magic_Number)==0)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true)))
   { 
In the code all the entry possibilities for a short I used the Bid:
PHP Code:
if (((Pyramid==true)&&(Use_MA_Entry==false)&&(Bid <= Next_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==false))||
     ((
Pyramid==false)&&(Use_MA_Entry==false)&&(Bid >= Next_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==false))||
     ((
Pyramid==true)&&(Use_MA_Entry==false)&&(Bid <= Next_Sell)&&(Bid<Last_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true))||
     ((
Pyramid==true)&&(Use_MA_Entry==false)&&(Bid <= Next_Sell)&&(OTS(Magic_Number)==0)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true))||
     ((
Pyramid==false)&&(Use_MA_Entry==false)&&(Bid >= Next_Sell)&&(Bid>Last_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true))||
     ((
Pyramid==false)&&(Use_MA_Entry==false)&&(Bid >= Next_Sell)&&(OTS(Magic_Number)==0)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true)))
   { 
This is what made sense to me, maybe I'm wrong though.

I tried to make it so when you enter 2 for your EntryLag_Long, the "arrow" is opened at 2 pips above the high, and when you enter 2 for your EntryLag_Short, the "arrow" is opened 2 pips below the low.

Now you know my reasoning and how I coded this, so is it right?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #883 (permalink)  
Old 02-27-2008, 03:23 AM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,010
ElectricSavant is on a distinguished road
I will test...Thank you wolfe. Can I have some of those "smart pills" you are taking...What is your secret to keeping such a consistently nimble mind?

Your reasoning seems as sharp as a tack...

ES


Quote:
Originally Posted by wolfe View Post
This is the last thing I want to be on the "same page" with, before I post the (hopefully) corrected v1_8.

Let me explain what I tried to do:

All long ordersend commands must use the ask.
PHP Code:
OrderSend(Symbol(),OP_BUY,Lot_Size,Ask,Slippage,NULL,NULL,"TFX_LONG_ADDITIONAL",Magic_Number,0,Green); 
All short ordersend commands must use the bid.
PHP Code:
OrderSend(Symbol(),OP_SELL,Lot_Size,Bid,Slippage,NULL,NULL,"TFX_SHORT_ADDITIONAL",Magic_Number,0,Red); 
When you see an arrow on a chart for an opened long order, that arrow is the ask. The ask is the price you're long order opened at.

When you see an arrow on a chart for an opened short order, that arrow is the bid. The bid is the price you're short order opened at.

At least this is how I understand things.

So, in the code all the entry possibilities for a long I used the Ask:
PHP Code:
if (((Pyramid==true)&&(Use_MA_Entry==false)&&(Ask >= Next_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==false))||
     ((
Pyramid==false)&&(Use_MA_Entry==false)&&(Ask <= Next_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==false))||
     ((
Pyramid==true)&&(Use_MA_Entry==false)&&(Ask >= Next_Buy)&&(Ask>Last_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true))||
     ((
Pyramid==true)&&(Use_MA_Entry==false)&&(Ask >= Next_Buy)&&(OTL(Magic_Number)==0)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true))||
     ((
Pyramid==false)&&(Use_MA_Entry==false)&&(Ask <= Next_Buy)&&(Ask<Last_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true))||
     ((
Pyramid==false)&&(Use_MA_Entry==false)&&(Ask <= Next_Buy)&&(OTL(Magic_Number)==0)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true)))
   { 
In the code all the entry possibilities for a short I used the Bid:
PHP Code:
if (((Pyramid==true)&&(Use_MA_Entry==false)&&(Bid <= Next_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==false))||
     ((
Pyramid==false)&&(Use_MA_Entry==false)&&(Bid >= Next_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==false))||
     ((
Pyramid==true)&&(Use_MA_Entry==false)&&(Bid <= Next_Sell)&&(Bid<Last_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true))||
     ((
Pyramid==true)&&(Use_MA_Entry==false)&&(Bid <= Next_Sell)&&(OTS(Magic_Number)==0)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true))||
     ((
Pyramid==false)&&(Use_MA_Entry==false)&&(Bid >= Next_Sell)&&(Bid>Last_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true))||
     ((
Pyramid==false)&&(Use_MA_Entry==false)&&(Bid >= Next_Sell)&&(OTS(Magic_Number)==0)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true)))
   { 
This is what made sense to me, maybe I'm wrong though.

I tried to make it so when you enter 2 for your EntryLag_Long, the "arrow" is opened at 2 pips above the high, and when you enter 2 for your EntryLag_Short, the "arrow" is opened 2 pips below the low.

Now you know my reasoning and how I coded this, so is it right?

Last edited by ElectricSavant; 02-27-2008 at 03:30 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #884 (permalink)  
Old 02-27-2008, 03:36 AM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,010
ElectricSavant is on a distinguished road
you guys...when wolfe gets done with the "LastEntryFilter corrected EA", I hope to illustrate how powerful it can be with the 5 MINUTE TF...

Visualize how it will work in pyramid mode...there will never be a subsequent Long entry after the opening long which will be lower than the opening long. The opening long will become the lowest of the upper grid....and vice versa for the Short..

hey this might even work better with Guppy!!

set the trail for 2 bucks at 50% ...

ES

Last edited by ElectricSavant; 02-27-2008 at 03:56 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #885 (permalink)  
Old 02-27-2008, 03:43 AM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 719
wolfe is on a distinguished road
Quote:
Originally Posted by ElectricSavant View Post
I will test...Thank you wolfe. Can I have some of those "smart pills" you are taking...What is your secret to keeping such a consistently nimble mind?

Your reasoning seems as sharp as a tack...

ES
I'll post it tonight.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #886 (permalink)  
Old 02-27-2008, 03:49 AM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 719
wolfe is on a distinguished road
I like how it works with pyramid true, and LastEntryFilter true.

I DO NOT like the setting of pyramid false, and LastEntryFilter true. Be aware of this setting! I think it could hurt.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #887 (permalink)  
Old 02-27-2008, 04:04 AM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 719
wolfe is on a distinguished road
RE_POST OF v1_8

*Please re-install if you have downloaded v1_8 previously!*
Attached Files
File Type: mq4 TFX v1_8.mq4 (62.3 KB, 104 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #888 (permalink)  
Old 02-27-2008, 04:30 AM
kayvan's Avatar
Senior Member
 
Join Date: Mar 2007
Location: .....
Posts: 145
kayvan is on a distinguished road
Quote:
Originally Posted by wolfe View Post
Kayvan,

We will address these ideas after I fix current bugs. This should be soon.

thank you wolfe.

counting minutes , for that moment.

Last edited by kayvan; 02-27-2008 at 10:59 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #889 (permalink)  
Old 02-27-2008, 07:27 AM
Telac's Avatar
Junior Member
 
Join Date: Jan 2008
Posts: 7
Telac is on a distinguished road
Thanks Wolf & ElectricSavant

Quote:
Originally Posted by wolfe View Post
I'll post it tonight.
Many thanks Wolf and ElectricSavant - I've been following this from the beginning. I've always believed that there was a way to incorporate Martingale in some way successfully. I hope this turns out to be just that. Will be testing with anticipation - Thanks again!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #890 (permalink)  
Old 02-27-2008, 01:52 PM
ElectricSavant's Avatar
Senior Member
 
Join Date: Jun 2007
Posts: 3,010
ElectricSavant is on a distinguished road
Thanks everybody you are very kind and thoughtful.

I just wanted to report v1.8 is now working correctly for the segment of testing I am in...

The LastEntryFilter method of trading actually places time on your side and the longer you are in a "trade-set" the more efficient it becomes.

I will not post a log-in yet as I want to test privatly a little longer to develop a setfile...if I make it that far!

Again.... the TS and the Last_Entry_Filter order placement logic, seem to be consistently functioning in v1.8.

ES

P.S. The "AutoRestart mode of true" bothers me less with the "Last_Entry_Filter = true method" . Another observation about "living with the trade" is I see lotsizes of 1.6 as the last size to reach to allow the TS of 2 bucks at 50% to work thus far...but the character of the market constantly changes and to harness that would be impossible (a hint to why nobody can beat the ElectricSavant Challenge™).

Last edited by ElectricSavant; 02-27-2008 at 02:16 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
martingale, martingale ea, martingale EA, martingale ea download

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/martingale-average-cost-hedging/11734-martingale-ea.html
Posted By For