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
  #1611 (permalink)  
Old 02-23-2009, 08:02 PM
Member
 
Join Date: Oct 2006
Posts: 80
Big Be is on a distinguished road
Very strange error message

I am getting this error message when compiling, referencing a couple of the functions:

“no dll defined for the imported function”

I have tried moving the function way up in the EA, to check for earlier syntax errors, but no change.
Since the EA does not use dll's, and the functions are similar to other functions that do NOT get an error message, I don't have a clue.

Here is one of the functions:

int getMom_A();
{
double MomA0 = iCustom(NULL, 0, "Mom A", IndUsedByEA, MaPeriods, MaMethod, APrice, APeriods, AMethod, Mom_Length, MomOnOpen,1,0);

if (MomA0 < -0.16)
{
return(SHORT);
}

if (MomA0 > 0.16)
{
return(LONG);
}
return(FLAT);
}

(The returned variables are actually integers, defined at the beginning of the program – not the problem.)

What is going on?

Big Be

Update: Problem solved! Found answer by Google to MQL4.com.
The First line should have no semicolon, so like this:
int getMom_A()

Last edited by Big Be; 02-24-2009 at 06:16 AM.
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
  #1612 (permalink)  
Old 02-23-2009, 08:04 PM
Member
 
Join Date: Oct 2006
Posts: 80
Big Be is on a distinguished road
Quote:
Originally Posted by Pied Piper View Post
Can any gracious coder/FxPro trader kindly figure out why I can't use this EA on FxPro's MT4 platform. I just can't seem to get EA to open a single trade for the life of me even with the default settings after many days.

FxPro uses the 5-digit format for their price and I've been wondering whether it's the reason. Can this be modified in the code? Someone pls help, it's slowly driving me nuts. Thanx in anticipation
The five digits is critical.
Mr Pip posted a solution some time ago.
"mypoint" would be a search term.

Big Be
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
  #1613 (permalink)  
Old 02-24-2009, 11:57 PM
Junior Member
 
Join Date: Dec 2008
Posts: 8
undertitan is on a distinguished road
Too many alerts

I wrote an indicator, and have an alert option, and when the Alert() is turned off, it prints a Comment() in the experts log.

I only want to know if the condition exists(give an alert) on the actual Close of the bar, which would be Close[i+1] I thought...

However, when I run the indicator with the Alert() on, it gives me multiple alerts on the current bar while the condition is happening, and generates too many alerts.

My log file for only a couple of hours was over 35mb!

How do I fix this problem?

Please see the attached indicator, which identifies a trend continuation pattern. ( described on a trader's website: 9/30 Setup )

Thanks,

Dan
Attached Images
File Type: gif ftm.gif (16.4 KB, 67 views)
Attached Files
File Type: mq4 9-30-v1.mq4 (4.1 KB, 18 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
  #1614 (permalink)  
Old 02-25-2009, 02:53 AM
Linuxser's Avatar
User Root
 
Join Date: May 2006
Location: Helliconia (Winter)
Posts: 4,410
Blog Entries: 56
Linuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond repute
Quote:
Originally Posted by undertitan View Post
I wrote an indicator, and have an alert option, and when the Alert() is turned off, it prints a Comment() in the experts log.

I only want to know if the condition exists(give an alert) on the actual Close of the bar, which would be Close[i+1] I thought...

However, when I run the indicator with the Alert() on, it gives me multiple alerts on the current bar while the condition is happening, and generates too many alerts.

My log file for only a couple of hours was over 35mb!

How do I fix this problem?

Please see the attached indicator, which identifies a trend continuation pattern. ( described on a trader's website: 9/30 Setup )

Thanks,

Dan
Try something like

int limit;
int counted_bars=IndicatorCounted();

if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;

for(int i=1; i<limit; i++)
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
  #1615 (permalink)  
Old 02-25-2009, 07:23 AM
Senior Member
 
Join Date: Oct 2008
Location: Vancouver, BC
Posts: 158
Roger09 is on a distinguished road
Quote:
Originally Posted by leeb View Post
Hi everyone,

Great forum :-)
I would like to know, I use money management to calculate lot size in my EA's, up until now my base currency has always been USD but could someone provide some code to calculate lot size if base currency is not USD, for example EUR etc ? Thanks in advance !
Calculator. Forex with Alpari
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
  #1616 (permalink)  
Old 02-25-2009, 06:43 PM
Junior Member
 
Join Date: Apr 2008
Posts: 4
simonkoen is on a distinguished road
Post Need Help on coding error

Hi

I`m quite new to forex trading as well as to coding in MQL4. I need help in setting up ordersend for SellLimit orders and BuyLimit orders. This is my code but I keep getting a Ordersend error 130 or 3. I don`t know what is wrong with the code.

if (Bid <= LowEnvelope) {OrderSend(Symbol(),OP_SELLLIMIT,lotMM,Bid-EmergencyProfit*Point,0,0,0," Sell Limit Order",MagicNumber,0,Orange);}

Please can someone Help me? 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
  #1617 (permalink)  
Old 02-25-2009, 06:50 PM
Junior Member
 
Join Date: Apr 2008
Posts: 4
simonkoen is on a distinguished road
Thumbs up This is a fantastic Place to learn

I just want to take the opportunity to say thanks to all the people whom make this forum possible and to all the other traders who are willing to share their knowledge freely with every one else. Thank you, I have learned quite a bit and still feel like I know nothing.
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
  #1618 (permalink)  
Old 02-26-2009, 12:37 AM
Senior Member
 
Join Date: Oct 2008
Location: Vancouver, BC
Posts: 158
Roger09 is on a distinguished road
Quote:
Originally Posted by simonkoen View Post
Hi

I`m quite new to forex trading as well as to coding in MQL4. I need help in setting up ordersend for SellLimit orders and BuyLimit orders. This is my code but I keep getting a Ordersend error 130 or 3. I don`t know what is wrong with the code.

if (Bid <= LowEnvelope) {OrderSend(Symbol(),OP_SELLLIMIT,lotMM,Bid-EmergencyProfit*Point,0,0,0," Sell Limit Order",MagicNumber,0,Orange);}

Please can someone Help me? Thank You
Price for SellLimit order should be higher then real price, not lower.
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
  #1619 (permalink)  
Old 02-26-2009, 12:50 PM
Junior Member
 
Join Date: Apr 2008
Posts: 4
simonkoen is on a distinguished road
Thanks

Thank You Roger9. I`m using seelstop and buystopp now instead and it is working fine.
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
  #1620 (permalink)  
Old 02-27-2009, 11:38 AM
djl djl is offline
Junior Member
 
Join Date: Dec 2008
Posts: 2
djl is on a distinguished road
get CurrentTime Frame() ?

Simple request - can anyone tell me how to get the current time frame / period being viewed? I.e. 1 hour, 4 hour, 1 day etc.

Have searched docs etc can't find it.

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

Tags
#include, candle time, CHinGsMAroonCLK, code, coders guru, conditionally, dll, eli hayun, Eur_harvester.ex4, expert adviser, expert advisor, forex, higher high, how to code, indicator, I_XO_A_H, kehedge, mechanical trading, metatrader command line, mt4, MT4-LevelStop-Reverse, OrderReliable.mqh, programming, rectangle tool, trading, volty channel stop


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
How to code this? iscuba11 Metatrader 4 mql 4 - Development course 1 08-03-2007 05:22 PM


All times are GMT. The time now is 01:06 PM.



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