Forex



Go Back   Forex Trading > Programming > MetaTrader
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-23-2009, 04:41 PM
Junior Member
 
Join Date: Nov 2008
Posts: 19
FxFux is on a distinguished road
Lightbulb profitable Hedging Lots Strategy

Hi,
i'm new in this forum.. from Germany and ask for someone help me in coding please.. attached is a very good hedging system that's very profitable for me.. But I need some adjustments.. First the ea has a start and end hour function, but it if you choose this function it takes only one trade.. f. e. if you set 15 till 19 GMT it makes only one trade at 15 and then ends trading.. I don't know why.. please help..
And second if you try this ea you will attract attention that the SL and the TP on the actual trade and the stop/sell type is not the same, but it should be the same.. at the moment I adjust the stop target levels manually.. I hope you understand this pleas help me.. my settings are:
Lots: 0.1
StopDistance: 20.0
TakeProfit: 15.0
StopLoss: 30.0

many thanks in advice
Attached Files
File Type: mq4 Paulo_Costa_Hedge.mq4 (12.3 KB, 85 views)
File Type: pdf Hedging Lot Strategy.pdf (28.6 KB, 290 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
  #2 (permalink)  
Old 07-24-2009, 06:04 PM
Junior Member
 
Join Date: Mar 2009
Posts: 26
syedrizwan is on a distinguished road
I have added a parameter called FiveDigitBroker that seemed to have fixed the problem.

The potential of this EA is impressive but drawdowns not so much. I was only able to backtest it for some period if I start with 0.01 lot. Starting from 0.1 would blow up the account immediately.

Regards,
Riz
Attached Files
File Type: mq4 Paulo_Costa_Hedge.mq4 (12.4 KB, 73 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
  #3 (permalink)  
Old 07-27-2009, 05:22 PM
Junior Member
 
Join Date: Nov 2008
Posts: 19
FxFux is on a distinguished road
Sl/tp

Hi syedrizwan,

first thank you for your 5-digit-parameter.. very good.. the potential of this ea is really really impressive.. I'm live on alpari with 0.01 lots.. but I think the ea sets wrong sl/tp's.. f.e. on alpari I have a spread on eur/usd 1.8 pips.. so first trade:

sell 0.01 1.42166 S/L 1.42484 T/P 1.42024 and
stop buy 0.03 1.42346 S/L 1.42046 T/P 1.42506

here you see the difference between SL and TP is 2.2 pips, so it can happen that sell order hits sl but the stop buy order not touch the t/p from the already opened stop buy order and that is wrong.. I hope you understand the problem.. my english is not so well maybe you or someone else can fix this problem..

kind regards
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
  #4 (permalink)  
Old 07-28-2009, 04:08 AM
Junior Member
 
Join Date: Mar 2009
Posts: 26
syedrizwan is on a distinguished road
SL and TP calculations

for the sell order the SL gap is exactly 31.8 pips which is actually 30 pip stop loss + 1.8 pips spread and TP gap is exactly 14.2 which is actually 15 pips TP and - 1.8 pips spread.

I guess the only thing wrong with the calculations is that this EA is calculating both SL and TP using Ask for a sell order and similarly using Bid for the Buy order

Whereas, in my understanding, it should be calculating SL using Ask, and TP using Bid so the spread is accounted for, for a sell order. Similary for Buy order it should be changed accordingly.

If you confirm the above I can make these changes for you.

Regards,
Riz
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
  #5 (permalink)  
Old 07-28-2009, 10:26 AM
Junior Member
 
Join Date: Feb 2009
Posts: 9
orangkita is on a distinguished road
Paulo_Costa_Hedge.mq4 EA

Dear Syed, I tested the ea and yes it closes the po (same pair) once the open position hit TP but leave the other open position (same pair) as it is. Can you please check to enable all other open positions (profit/loss) also closed together with the one that hit the TP this may reduce the loses. Thanks
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
  #6 (permalink)  
Old 07-28-2009, 10:45 AM
Junior Member
 
Join Date: Feb 2009
Posts: 9
orangkita is on a distinguished road
Dear Syed, I tested the ea and yes it closes the po (same pair) once the open position hit TP but leave the other open position (same pair) as it is. Can you please check to enable all other open positions (profit/loss) also closed together with the one that hit the TP this may reduce the loses. In other way, the ea shall close all orders in the same pair once positive profit as set, this will eliminate the losses. Thanks
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
  #7 (permalink)  
Old 07-28-2009, 10:47 AM
Junior Member
 
Join Date: Mar 2009
Posts: 26
syedrizwan is on a distinguished road
should it close all orders or should it close all orders only if the total sum is in profit?

Right now the EA opens and closes positions according to the direction of the moving average.

Having said that I havent seen this EA actually closing the order itself, all of them seem to be either t/p or s/l.

Regards,
Riz

Last edited by syedrizwan; 07-28-2009 at 11:02 AM. Reason: Added more comments
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
  #8 (permalink)  
Old 07-28-2009, 11:35 AM
Junior Member
 
Join Date: Nov 2008
Posts: 19
FxFux is on a distinguished road
Quote:
Originally Posted by syedrizwan View Post
for the sell order the SL gap is exactly 31.8 pips which is actually 30 pip stop loss + 1.8 pips spread and TP gap is exactly 14.2 which is actually 15 pips TP and - 1.8 pips spread.

I guess the only thing wrong with the calculations is that this EA is calculating both SL and TP using Ask for a sell order and similarly using Bid for the Buy order

Whereas, in my understanding, it should be calculating SL using Ask, and TP using Bid so the spread is accounted for, for a sell order. Similary for Buy order it should be changed accordingly.

If you confirm the above I can make these changes for you.

Regards,
Riz
YES you're right it's using Ask for a sell order and Bid for the Buy order.. many thanks for changing this
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
  #9 (permalink)  
Old 07-29-2009, 02:54 AM
Junior Member
 
Join Date: Mar 2009
Posts: 26
syedrizwan is on a distinguished road
Just a re-confirmation before I post the EA:

for Buy Order SL = Ask - SLPips and TP = Bid + TPPips

for Sell Order SL = Bid + SLPips and TP = Ask - TPPips

Above is the change which I will make. Appologies for being dumb (its a professional requirement as a programmer (never assume anything) )

Regards,
Riz
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
  #10 (permalink)  
Old 07-29-2009, 06:57 AM
Junior Member
 
Join Date: Nov 2008
Posts: 19
FxFux is on a distinguished road
re-confirmation

hey riz,

confirmed and many many thanks
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


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
A profitable Scalping strategy Cyclesurfer Suggestions for Trading Systems 58 05-30-2009 05:33 AM
Low risk Hedging strategy jgerousis Suggestions for Trading Systems 2 03-01-2007 08:33 PM
Please HELP! HELP! HELP! for my very simple and profitable strategy Michel Metatrader 4 9 12-01-2006 06:33 AM
very profitable backe test for this strategy harold4x Suggestions for Trading Systems 5 03-14-2006 04:34 PM


All times are GMT. The time now is 10:21 AM.



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