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
  #21 (permalink)  
Old 06-22-2007, 03:21 AM
Member
 
Join Date: Apr 2006
Location: Florida, USA
Posts: 97
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #22 (permalink)  
Old 06-22-2007, 02: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 03:15 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
  #23 (permalink)  
Old 06-23-2007, 03:54 AM
Neo Neo is offline
Member
 
Join Date: Jun 2006
Posts: 46
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, 522 views)
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
  #24 (permalink)  
Old 06-23-2007, 04:04 AM
fxnewbie's Avatar
Senior Member
 
Join Date: Jun 2006
Posts: 495
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #25 (permalink)  
Old 06-23-2007, 04:10 AM
Neo Neo is offline
Member
 
Join Date: Jun 2006
Posts: 46
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, 305 views)
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
  #26 (permalink)  
Old 06-23-2007, 04:48 AM
fxnewbie's Avatar
Senior Member
 
Join Date: Jun 2006
Posts: 495
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #27 (permalink)  
Old 06-23-2007, 07:38 AM
Senior Member
 
Join Date: Feb 2006
Posts: 586
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, 558 views)
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
  #28 (permalink)  
Old 06-23-2007, 07:51 AM
fxnewbie's Avatar
Senior Member
 
Join Date: Jun 2006
Posts: 495
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #29 (permalink)  
Old 06-23-2007, 11:46 AM
Neo Neo is offline
Member
 
Join Date: Jun 2006
Posts: 46
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #30 (permalink)  
Old 06-23-2007, 03:09 PM
fxnewbie's Avatar
Senior Member
 
Join Date: Jun 2006
Posts: 495
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!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
adaptive RSI, ADAPTIVE RSI.EX4, ADXMA, bless ea, cache:QNp-4lQtnkIJ:www.forex-tsd.com/martingale-average-cost-hedging/8126-pipmaker-v1-price-action-b, don_forex, ea pipmaker, forex, forex pipmaker, Forex price action, forex price action EA, forex tsd, forex tsd pipmaker, forex-tsd, i_Trend.ex4, ordersend error 4051, pallada, pallada ea, pip maker, Pipmaker, pipmaker 15, pipmaker 9-1, pipmaker ea, pipmaker expert, pipmaker expert advisor, pipmaker forex, pipmaker Forex TSD, PipMaker mq4, PipMaker MT4, pipmaker settings, pipmaker v10, pipmaker v14, PIPMAKER V15, pipmaker v15_3, PipMaker v5, pipmaker v9, PipMakerV5aNeo, PipMaker_NeoV5a_Rodmod8.mq4, pipmaker_v15, Pipmaker_V15.mq4, Pipmaker_V15_4.mq4, Price, price action, price action ea, price action expert advisor, price action forex, price action forex trading, price action mq4, price action trading, slope direction line, slope direction line modified.mq4, Terminator, terminator ea, tsd forex, USD CDN Terminator EA, www.forex-tsd.com

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
Want some action? FX of course Kirsty_FX Suggestions for Trading Systems 2 05-17-2007 03:15 AM
Price action reversal EA help !!!!! compro99 Expert Advisors - Metatrader 4 1 06-19-2006 04:00 PM
EA Based on Price Movement babarmughal Expert Advisors - Metatrader 4 10 05-29-2006 08:56 PM
Bar Action Shahzadfx Expert Advisors - Metatrader 4 16 04-04-2006 05:38 AM


All times are GMT. The time now is 09:57 AM.



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