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
  #721 (permalink)  
Old 06-15-2009, 05:09 PM
Senior Member
 
Join Date: Dec 2007
Posts: 492
Enforcer is on a distinguished road
Quote:
Originally Posted by matrixebiz View Post
Ok, cool, so I can use the same command and in an EA
I need to space down "/n" correct? because the comment will overwrite the IndicatorShortName correct?
Correct, with "/n" break rows.
Put on deinit()

Comment("");

to remove comment from chart when remove indicator;
__________________
www.signalcopy.com - Most advanced tools for copy Metatrader signals.
Free MT4 account statistics - advanced stats and graphs for MT4 accounts
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
  #722 (permalink)  
Old 06-15-2009, 05:41 PM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
Quote:
Originally Posted by Enforcer View Post
Correct, with "/n" break rows.
Put on deinit()

Comment("");

to remove comment from chart when remove indicator;
Yes, works

Thank 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
  #723 (permalink)  
Old 06-17-2009, 06:20 AM
Junior Member
 
Join Date: May 2008
Posts: 2
bilibibit is on a distinguished road
MT4 code to know if mini or std or micro.

Been hunting this for some time now. With all the ways accounts can be set up - mini, micro, std, what code snippet can you incorporate in mq4 code so it knows the correct order to place.

For example, I want to risk only 1% of a 10,000 USD account. The logic I use results in a loss of 1000 USD however when the stop loss is hit. I figure there's something wrong with my computation of risk?

NumLotsd = NormalizeDouble((MaxCapd*MaxRisk)/(distance/Point),1);

where
distance = highest - lowest;

double highest = High[iHighest(NULL,0,MODE_HIGH,PeriodBack,1)],
lowest = Low[iLowest(NULL,0,MODE_LOW,PeriodBack,1)];

PeriodBack can be any integer.

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
  #724 (permalink)  
Old 06-21-2009, 03:29 PM
Junior Member
 
Join Date: Jul 2008
Posts: 1
dmiranda is on a distinguished road
How to send an order when an indicator change its color?

Hi,

I a newbie in MQL4, and I need some help.

How to send an order when an indicator change its color? I`ve studied about that but I`ve not found the information. I`d like to use the color of an indicator as an entrance parameter to create a condition to send an order. Could anyone help me, please?

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
  #725 (permalink)  
Old 06-24-2009, 01:14 PM
Junior Member
 
Join Date: Jun 2009
Posts: 4
Smith23 is on a distinguished road
help

I have one question about most of indicators code.


i=Bars-XPeriod-1;
i=Bars-counted_bars-1

Am I right in thinking it gives us the value of the previous candle?


Thanks in advance for answer
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
  #726 (permalink)  
Old 06-25-2009, 05:05 AM
Junior Member
 
Join Date: Jun 2008
Posts: 4
jandiage is on a distinguished road
can anyone convert a script to indicator?

hello,


below is a script, and can anyone help convert this to indicator? thanks



// Output OHLCV history for surrent pair/symbol
int start() {
string fname = Symbol() + "," + Period() + ".csv";
int handle = FileOpen(fname, FILE_CSV|FILE_WRITE, ",");
if (handle>0) {
for(int i=0; i<Bars; i++) {
datetime d = Time[i];
d = StrToTime((TimeYear(d) - 100) + StringSubstr(TimeToStr(d),4)); // subtracts 10 years from d
string date1 = TimeToStr(d,TIME_DATE);
date1 = StringSubstr(date1,5,2) + "-" + StringSubstr(date1,8,2) + "-" + StringSubstr(date1,0,4);
string time1 = TimeToStr(d,TIME_MINUTES);
FileWrite(handle, date1, time1, Open[i], High[i], Low[i], Close[i], Volume[i]);
}
FileClose(handle);
MessageBox("History output complete\nto file ...../experts/files/"+fname);
}
return(0);
}
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
  #727 (permalink)  
Old 06-27-2009, 06:00 PM
Junior Member
 
Join Date: Jun 2009
Posts: 5
smokinbs is on a distinguished road
I need help getting Started

Would someone please tell me what function or feature I can use to get historical pricing from my EA? I'm new to Forex and MQL4 and just want to get my feet wet by playing with actual prices. However I can't seem to figure out how to get them. What I want to do is compare three different sets of pricing information "open-close" for 1 minute, 5 minutes, 10 minutes" or "hours, days, weeks, etc".
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
  #728 (permalink)  
Old 06-28-2009, 10:04 AM
Senior Member
 
Join Date: Nov 2006
Posts: 308
luxinterior is on a distinguished road
Quote:
Originally Posted by smokinbs View Post
Would someone please tell me what function or feature I can use to get historical pricing from my EA? I'm new to Forex and MQL4 and just want to get my feet wet by playing with actual prices. However I can't seem to figure out how to get them. What I want to do is compare three different sets of pricing information "open-close" for 1 minute, 5 minutes, 10 minutes" or "hours, days, weeks, etc".
Not quite sure what you're asking but have you looked at iHigh, iLow, iClose etc...? You can set the time frame to use. You won't be able to get 10 m TF as it doesn't exist in MT.

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
  #729 (permalink)  
Old 06-29-2009, 11:00 PM
Junior Member
 
Join Date: Oct 2008
Posts: 11
godfather4 is on a distinguished road
ea with key

can someone help me with this ea?there is a key that i have but is it not working.i have receipt and everything.is there anyone who can modify?
Attached Files
File Type: mq4 eakey.mq4 (24.2 KB, 24 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
  #730 (permalink)  
Old 06-29-2009, 11:43 PM
Junior Member
 
Join Date: May 2009
Posts: 5
johnboy411 is on a distinguished road
do you have "Kernel32.dll" in library folder in experts??
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:00 AM.



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