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 (51) Thread Tools Display Modes
  #21 (permalink)  
Old 06-22-2007, 02:21 AM
Member
 
Join Date: Apr 2006
Location: Florida, USA
Posts: 72
crodzilla is on a distinguished road
Thanks...

Don,

Thanks for that info. I did not look close enough at the code to see that. What I did do was add a trend change filter. I've seen that the code will exit positions upon a profit target. What I did was add the "peak of ADX" filter which signals a possible trend change. So, by using the next higher time frame use the ADX to allow the code to then check for profit target and exit positions as nesessary. The results have been encouraging. I am still testing, but find that the delay to the end of trends (or consolidations), squeezes out more profit from some of those positions. So in essence, the profit target becomes minimum profit target.

Thanks for sharing this EA. I am infinetly interested in these type of EA's.

Carl
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #22 (permalink)  
Old 06-22-2007, 01:28 PM
don_forex's Avatar
Member
 
Join Date: Oct 2005
Posts: 67
don_forex is on a distinguished road
Version 3

I will post the EA to the first post.

Here is the updates explained...

1. Changed Boost to an extern bool and made it true. This allows multiple trades per candle and not just on the opening of the candle.

2. TrendSpacing - This is a separate spacing increment for when the price is higher than the highest buy or lower than the lowest sell. It allows the profit to accumulate quicker when in a trend.

3. CounterTrendMultiplier - This multiplies the lot size to help the retracements accumulate profit quicker. Set to 1 if you want the lot size to stay the same.

4. In the CheckForBuy() and CheckForSell() routines, I broke up the entries into two separate subroutines. This allows for the TrendSpacing and CounterTrendMultiplier.

5. I also added a MidPoint line for a visual aid. It has no real purpose.

6. Simplified the right side label to incorporate the margin and low margin and balance into one label.

Still having problems with the losing orders closing improperly. Still working on it. Can still use some help on it!

Don

EDIT - I didn't get the LWMA added to this version. Maybe in the next one.

Last edited by don_forex; 06-22-2007 at 02:15 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #23 (permalink)  
Old 06-23-2007, 02:54 AM
Neo Neo is offline
Junior Member
 
Join Date: Jun 2006
Posts: 28
Neo is on a distinguished road
Okay.... found a few things that needed attention and tidied up the source a little in the process.

Main things were:

1) removed a couple of redundant variables
2) added RefreshRates() at appropriate points

In CheckForBuy() & CheckForSell():

1) added a check for zero lot sizes
2) commented out the "for loops" around the calls to OrderSend() as I couldn't see what they achieved

In Start():

1) added checks for HighestBuyTicket, LowestBuyTicket, HighestSellTicket & LowestSellTicket being zero before trying to select/close the distant order


I've run a quick test from Sept 06 to June 07 and no errors are now being reported either for opening or closing orders. In the test, as a batch of SELLs was closed at a profit, the most losing BUY was also closed and vice-versa.

Obviously, some more checking would be good, just in case I've missed something but the updated source is here.....
Attached Files
File Type: mq4 PipMakerv3a.mq4 (19.5 KB, 372 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #24 (permalink)  
Old 06-23-2007, 03:04 AM
Senior Member
 
Join Date: Jun 2006
Posts: 370
fxnewbie is on a distinguished road
Quote:
Originally Posted by Neo View Post
Okay.... found a few things that needed attention and tidied up the source a little in the process.

Main things were:

1) removed a couple of redundant variables
2) added RefreshRates() at appropriate points

In CheckForBuy() & CheckForSell():

1) added a check for zero lot sizes
2) commented out the "for loops" around the calls to OrderSend() as I couldn't see what they achieved

In Start():

1) added checks for HighestBuyTicket, LowestBuyTicket, HighestSellTicket & LowestSellTicket being zero before trying to select/close the distant order


I've run a quick test from Sept 06 to June 07 and no errors are now being reported either for opening or closing orders. In the test, as a batch of SELLs was closed at a profit, the most losing BUY was also closed and vice-versa.

Obviously, some more checking would be good, just in case I've missed something but the updated source is here.....
67 errors, 54 warnings
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #25 (permalink)  
Old 06-23-2007, 03:10 AM
Neo Neo is offline
Junior Member
 
Join Date: Jun 2006
Posts: 28
Neo is on a distinguished road
That'll teach me to make changes in an editor without recompiling first

As is often the way, it was a single closing bracket that I thought I'd removed in the clean-up so here is the tested version...
Attached Files
File Type: mq4 PipMakerv3a.mq4 (19.5 KB, 221 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #26 (permalink)  
Old 06-23-2007, 03:48 AM
Senior Member
 
Join Date: Jun 2006
Posts: 370
fxnewbie is on a distinguished road
Still getting 67 errors, 54 warnings
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #27 (permalink)  
Old 06-23-2007, 06:38 AM
Senior Member
 
Join Date: Feb 2006
Posts: 525
Michel is on a distinguished road
Quote:
Originally Posted by fxnewbie View Post
Still getting 67 errors, 54 warnings
This one compile fine.
Attached Files
File Type: mq4 PipMakerv3a.mq4 (19.5 KB, 422 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #28 (permalink)  
Old 06-23-2007, 06:51 AM
Senior Member
 
Join Date: Jun 2006
Posts: 370
fxnewbie is on a distinguished road
Quote:
Originally Posted by Michel View Post
This one compile fine.
Tks. a lot, Michel
I will try.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #29 (permalink)  
Old 06-23-2007, 10:46 AM
Neo Neo is offline
Junior Member
 
Join Date: Jun 2006
Posts: 28
Neo is on a distinguished road
Sorry fxnewbie - sure I'd uploaded the fixed version but perhaps not.

Guess that's what happens when you're coding at 4am
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #30 (permalink)  
Old 06-23-2007, 02:09 PM
Senior Member
 
Join Date: Jun 2006
Posts: 370
fxnewbie is on a distinguished road
Quote:
Originally Posted by Neo View Post
Sorry fxnewbie - sure I'd uploaded the fixed version but perhaps not.

Guess that's what happens when you're coding at 4am
Not to worrie, mate
Your efforts are much apreciate.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
adaptive RSI, forex tsd, forex-tsd, Pipmaker, pipmaker ea, pipmaker forex, PIPMAKER V15, tsd forex, pallada, price action, PipMakerV5aNeo, i_Trend.ex4, price action ea, pipmaker 9-1, forex pipmaker, PipMaker mq4, pipmaker v9

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/8126-pipmaker-v1-price-action-based-ea.html
Posted By For Type Date
Bless EA [zmodykifowana] This thread Refback 09-09-2008 09:53 PM
Bless EA [zmodykifowana] This thread Refback 08-17-2008 04:23 AM
Bless EA [zmodykifowana] This thread Refback 08-06-2008 08:05 PM
Bless EA [zmodykifowana] This thread Refback 08-06-2008 10:53 AM
Bless EA [zmodykifowana] This thread Refback 07-29-2008 12:07 PM
Per tutti: Expert Advisor/Strategia da valutare - Forex Forum This thread Refback 06-26-2008 09:37 AM
FX扑旦氾丞玄伊□玉憤がыъ撢薨撮 Post #1021 Refback 06-24-2008 02:16 PM
FX扑旦氾丞玄伊□玉憤がыъ撢薨撮 Post #1021 Refback 06-14-2008 04:09 PM
丟正玄伊□母□分丑〞﹛ 200805 This thread Refback 06-06-2008 03:17 PM
Per tutti: Expert Advisor/Strategia da valutare - Forex Forum This thread Refback 04-15-2008 12:39 PM
^g!@SXX: PipMaker This thread Refback 03-28-2008 02:42 AM
^g!@SXX: tEA!! This thread Refback 03-26-2008 12:06 AM
^g!@SXX This thread Refback 03-25-2008 11:15 PM
Expert Advisor | Forex MetaTrader Expert Advisors | Over 40 of the Best EA's for MT4 on Squidoo This thread Refback 03-14-2008 04:32 AM
Expert Advisor | Forex MetaTrader Expert Advisors | Over 40 of the Best EA's for MT4 on Squidoo This thread Refback 03-09-2008 07:41 PM
Expert Advisor | Forex MetaTrader Expert Advisors | Over 40 of the Best EA's for MT4 on Squidoo This thread Refback 03-07-2008 02:31 AM
≠MT4∞MetaTrader Part8≠丟正玄伊□母□∞ - MetaTrader引午戶Wiki This thread Refback 02-24-2008 06:14 AM
ゞ堣吨韝リ滮咫韝リ漶式式再ll you need is TREND〞﹋移鎖﹌ This thread Refback 02-23-2008 08:51 PM
Per tutti: Expert Advisor/Strategia da valutare - Forex Forum This thread Refback 02-23-2008 11:01 AM
塈琠堻椈堭堛塈 堻堹堹 !!! - 媯堶 16 - Sarmaye Forums This thread Refback 02-21-2008 12:27 AM
塈琠堻椈堭堛塈 堻堹堹 !!! - 媯堶 16 - Sarmaye Forums This thread Refback 02-13-2008 06:28 AM
TSD及白巧□仿丞尺及伉件弁 | 1坳晚井日杴隙允葆鳳莢汊 This thread Refback 02-09-2008 09:35 PM
塈琠堻椈堭堛塈 堻堹堹 !!! - 媯堶 16 - Sarmaye Forums This thread Refback 02-08-2008 01:34 PM
塈琠堻椈堭堛塈 堻堹堹 !!! - 媯堶 15 - Sarmaye Forums This thread Refback 02-08-2008 01:18 PM
塈琠堻椈堭堛塈 堻堹堹 !!! - 媯堶 16 - Sarmaye Forums This thread Refback 02-07-2008 12:16 AM
塈琠堻椈堭堛塈 堻堹堹 !!! - 媯堶 16 - Sarmaye Forums This thread Refback 02-06-2008 03:30 PM
塈琠堻椈堭堛塈 堻堹堹 !!! - 媯堶 16 - Sarmaye Forums This thread Refback 02-06-2008 07:43 AM
塈琠堻椈堭堛塈 堻堹堹 !!! - 媯堶 16 - Sarmaye Forums This thread Refback 02-06-2008 06:23 AM
塈琠堻椈堭堛塈 堻堹堹 !!! - 媯堶 16 - Sarmaye Forums This thread Refback 02-06-2008 06:03 AM
200801 ゞ堣吨韝リ滮咫韝リ漶式式再ll you need is TREND〞﹋移鎖﹌ This thread Refback 02-03-2008 08:40 AM
Per tutti: Expert Advisor/Strategia da valutare - Forex Forum This thread Refback 01-31-2008 07:00 PM
ゞ堣吨韝リ滮咫韝リ漶式式再ll you need is TREND〞﹋移鎖﹌ This thread Refback 01-30-2008 07:57 AM
20080116 ゞ堣吨韝リ滮咫韝リ漶式式再ll you need is TREND〞﹋移鎖﹌ This thread Refback 01-27-2008 12:50 PM
塈琠堻椈堭堛塈 堻堹堹 !!! - 媯堶 15 - Sarmaye Forums This thread Refback 01-22-2008 08:16 PM
ゞ堣吨韝リ滮咫韝リ漶式式再ll you need is TREND〞﹋移鎖﹌ This thread Refback 01-18-2008 05:43 PM
ゞ堣吨韝リ滮咫韝リ漶式式再ll you need is TREND〞﹋移鎖﹌ This thread Refback 01-18-2008 03:32 AM