Forex
Google
New signals service!

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions


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 (2) Thread Tools Display Modes
  #1201 (permalink)  
Old 06-26-2008, 01:31 AM
Member
 
Join Date: Oct 2006
Posts: 33
Kaper is on a distinguished road
Need a little help

I have a martingale type EA that wasn't written by me and I would like to change the way it places the orders. Here is how the EA works now. Let's say it opens a buy order for .10 lots for GBP at 1.9700. It then will open orders at user specified intervals. For instance I tell 50 pips apart. It will then open another buy order for .20 when price reaches 1.9650 and for .30 lots at 1.9600 and so on.

What I want it to do is use stop buys instead. For example after the first order at 1.9700 is open, I would like it to place a pending order at 1.9650 once the price has gone 25 pips below 1.9650. So when the price reaches 1.9625, then a pending buy stop order for .20 lots at 1.9650 is placed. If the price then climbs back up to 1.9650, then the buy is executed. This would stop the EA from accumulating losing positions if price went drastically against the first postiion. I would like to specify the number pips away from price to enter pending order.

I need to know what code, I need to change and add to accomplish this. If needed, I could give the EA. Thanks for any help.

Kevin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1202 (permalink)  
Old 06-30-2008, 05:38 AM
Senior Member
 
Join Date: Dec 2005
Location: In front of my trading desk
Posts: 340
Devil2000 is on a distinguished road
Programmaticaly refresh the repaint indicator

Hello,

I'm looking to find a way to refresh a repaint indicator for every x minutes.
The only way to refresh it currently, is to click in the indicator on the chart and then click "ok". Can we automate it with MQL4 code?
I found something on codersguru's site, Programmatically Refresh your charts | www.metatrader.info, but it seems not working for me. Or is there anybody has try it and get different result (working)?

Thank you
__________________
Still learning..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1203 (permalink)  
Old 07-02-2008, 02:48 PM
Member
 
Join Date: Jan 2008
Posts: 32
Pussy Galore is on a distinguished road
Change background color

I've adapted an existing trend indicator to create an object on the screen which displays UP, DOWN or HOLD as the trend changes. To improve clarity, I wonder if it is also possible to change the entire chart background to act as a more visible alert when the trend hits HOLD.

Is there a piece of code that I can use to do this? I've looked through the manual and haven't been able to see anything so far.

Last edited by Pussy Galore; 07-02-2008 at 02:50 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1204 (permalink)  
Old 07-03-2008, 12:33 AM
Senior Member
 
Join Date: Feb 2007
Posts: 710
FerruFx is on a distinguished road
Quote:
Originally Posted by Pussy Galore View Post
I've adapted an existing trend indicator to create an object on the screen which displays UP, DOWN or HOLD as the trend changes. To improve clarity, I wonder if it is also possible to change the entire chart background to act as a more visible alert when the trend hits HOLD.

Is there a piece of code that I can use to do this? I've looked through the manual and haven't been able to see anything so far.
Not sure if that is possible but the solution would be to plot a colored rectangle (full screen size).

FerruFx
__________________
THE HEART of FOREX & THE PROBABILITY METER - Trade with 100% confidence and ... Stress Less!!!
Coding services: Experts Advisors, indicators, alerts, etc ... more info by PM
NEW: video presentation of the Probability Meter ... 24hrs action on the website
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1205 (permalink)  
Old 07-03-2008, 05:21 AM
Junior Member
 
Join Date: Apr 2008
Posts: 15
npantzos is on a distinguished road
pleas help me

why not work code this ea?

extern int MaxOpenTime_BUY = 100; //time to max open LONG position
extern int MaxOpenTime_SELL = 100; //time to max open SHORT position

not working this filter
what is rong?
Attached Files
File Type: mq4 King_EAv0.1.mq4 (4.9 KB, 4 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1206 (permalink)  
Old 07-03-2008, 04:29 PM
Member
 
Join Date: Jan 2008
Posts: 32
Pussy Galore is on a distinguished road
Quote:
Originally Posted by FerruFx View Post
Not sure if that is possible but the solution would be to plot a colored rectangle (full screen size).
That's a brilliant solution, FerruFX, which I've now implimented and it's working fine. Many thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1207 (permalink)  
Old 07-05-2008, 10:43 AM
Member
 
Join Date: Jan 2008
Posts: 32
Pussy Galore is on a distinguished road
2 indicators in same window

Could somebody please either tell me or point to a thread showing how to do this.

I want to have 2 indicators displaying in the same window. Both indicators are oscillators with the same fixed minimum and maximum which I gather is important for it to work. One indicator is a MTF version of the other.

I've seen it done, but I don't know how to do it.

If I could make it work, it would save a bit of valuable desktop space.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1208 (permalink)  
Old 07-05-2008, 12:07 PM
Administrator
 
Join Date: Sep 2005
Posts: 15,942
Blog Entries: 64
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
This thread overlaying indicators
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1209 (permalink)  
Old 07-06-2008, 12:53 AM
Junior Member
 
Join Date: May 2008
Posts: 26
payback is on a distinguished road
[how??] getting info from opened positions??

Hi all again!!! i thank u in advance, bacause i found in this forum lots of really useful informations and ideas

I need to know how getting infos from opened positions, in my case how much the last order is in gain/loss

How can i do it?

Please help
thank you!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1210 (permalink)  
Old 07-06-2008, 02:41 AM
Senior Member
 
Join Date: Nov 2006
Posts: 156
luxinterior is on a distinguished road
From the mql4 help file...

Code:
double OrderProfit( ) 

Returns the net profit value (without swaps or commissions) for the selected order. For open positions, it is the current unrealized profit. For closed orders, it is the fixed profit.
Returns profit for the currently selected order.
Hope that helps.

Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV
ForexArea.com
Users of Gap Trader from 'Forex-Assistant' MUST Read This
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
histogram

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 On
Forum Jump

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/questions/270-ask.html
Posted By For Type Date
OzFx System:) - Page 639 This thread Refback 06-21-2008 09:53 PM
Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart This thread Refback 12-08-2007 11:46 AM


All times are GMT. The time now is 05:49 AM.



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