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
  #731 (permalink)  
Old 06-30-2009, 02:57 AM
Junior Member
 
Join Date: May 2007
Posts: 24
johnfx is on a distinguished road
Lock pips profit

Hi all,

How can I add Lock pips profit (+5 pips) in the EA ? It had breakeven already.

Thanks in advance.
__________________
John
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
  #732 (permalink)  
Old 06-30-2009, 04:06 AM
Senior Member
 
Join Date: Nov 2005
Location: Canada
Posts: 208
Blaiserboy is on a distinguished road
Quote:
Originally Posted by johnfx View Post
Hi all,

How can I add Lock pips profit (+5 pips) in the EA ? It had breakeven already.

Thanks in advance.
Perhaps you have to post some details about the EA or else the EA itself so someone can get enough information to reply to you.
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
  #733 (permalink)  
Old 06-30-2009, 05:25 AM
Junior Member
 
Join Date: May 2007
Posts: 24
johnfx is on a distinguished road
Quote:
Originally Posted by Blaiserboy View Post
Perhaps you have to post some details about the EA or else the EA itself so someone can get enough information to reply to you.
Hi Blaiserboy,

Here it is:

Thanks in advance.
Attached Files
File Type: mq4 ADX Crossing EA.mq4 (19.5 KB, 9 views)
__________________
John
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
  #734 (permalink)  
Old 06-30-2009, 05:55 AM
Senior Member
 
Join Date: Nov 2005
Location: Canada
Posts: 208
Blaiserboy is on a distinguished road
JohnFx

You can modify the EA inMetatrader........... you can see in the diagram what you have to alter.......

be sure to re compile it after any changes.

Have fun....!!
Attached Images
File Type: png daveM - snagz -00043.png (8.5 KB, 52 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
  #735 (permalink)  
Old 06-30-2009, 06:38 AM
Junior Member
 
Join Date: May 2007
Posts: 24
johnfx is on a distinguished road
Quote:
Originally Posted by Blaiserboy View Post
JohnFx

You can modify the EA inMetatrader........... you can see in the diagram what you have to alter.......

be sure to re compile it after any changes.

Have fun....!!
Hi Blaiserboy,

Thought you don't understand what I mean. I'd like it move SL to breakeven+5 pips (lock 5 pips, not TP = 5 pips) at xxx pips profits.

Thanks anyways,
__________________
John
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
  #736 (permalink)  
Old 06-30-2009, 07:00 AM
Junior Member
 
Join Date: May 2007
Posts: 24
johnfx is on a distinguished road
Anyways this EA is very promising but need to improve.

It need add the lock profits +5 pips as soon as it reach +50 pips and start open trade at the 3rd bar (Shift=3) if there is no opposite signal.

Is there any one can help ?

Thanks in advance,
__________________
John
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
  #737 (permalink)  
Old 06-30-2009, 07:37 AM
Junior Member
 
Join Date: Oct 2008
Posts: 11
godfather4 is on a distinguished road
Quote:
Originally Posted by johnboy411 View Post
do you have "Kernel32.dll" in library folder in experts??
no.there is no file like 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
  #738 (permalink)  
Old 06-30-2009, 03:05 PM
Junior Member
 
Join Date: Apr 2006
Posts: 26
Ricx is on a distinguished road
How to count pending orders?

hi, i need help how to count pending orders (active)

i tried...
int total;
total=OrdersTotal();
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
  #739 (permalink)  
Old 06-30-2009, 03:40 PM
Junior Member
 
Join Date: Apr 2006
Posts: 26
Ricx is on a distinguished road
Quote:
Originally Posted by Ricx View Post
hi, i need help how to count pending orders (active)

i tried...
int total;
total=OrdersTotal();
I just try using OrderType() and it works, but... i can't rewrite the extern price1=xxxx into extern price1=0.0 so i can stop the code....


New Problem:
How to write extern Price1 from EA code?? and it shows at the GUI Too??


extern Price1=0.0

(User input Price1=1.64000 so pending order triggered ~ so if we open the EA properties input the Price1 is no longer 0.0 default value it will set to 1.64000)

after functions completes, i need to revert back the Price1 to its default, Price1=0.0
even i used this code...
Price1=0;

The Price1 value is still at 1.64000
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
  #740 (permalink)  
Old 07-01-2009, 05:22 AM
Senior Member
 
Join Date: Nov 2006
Posts: 308
luxinterior is on a distinguished road
I'm not too clear on your question but if you're trying to phsyically change an external variable so that it will show up in your paramenters as changed then you can't do that. However if you change the value of an external variable from within your EA it stays changed until you recall the init function by either changing time frames, re-entering your external variables by looking them and pusing SAVE etc.

Not sure what you want to achieve but maybe take a look at global variables or consider writing values to a file.

Good luck

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!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
automated close order, close, eas, forex, learn mql4, learn mql4 video, learning mql4, mini std lotsize risk, mql4 ima, mql4 learning, mql4 video, OrderCloseBy, profit, reach, secure profit function, T101_v1.11_orest_IBFXm.mq4


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
Learning Cycles For New Traders Dan7974 General Discussion 350 01-18-2008 07:04 PM
Learning to code for autotrading GoatT MetaTrader 8 01-10-2007 09:55 PM
Self learning expert mrtools Expert Advisors - Metatrader 4 32 10-22-2006 06:29 PM


All times are GMT. The time now is 12:52 AM.



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