Forex



Go Back   Forex Trading > Downloads > Tools and utilities
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
  #91 (permalink)  
Old 04-26-2008, 03:40 PM
Junior Member
 
Join Date: Apr 2006
Posts: 24
Carlo is on a distinguished road
Quote:
Originally Posted by Linuxser View Post
Donīt you mind to attach the EA to see the code and if we can reproduce the error.

If you canīt attach the code look for some quote in the code like the following and post it.

or some line ending with DLL like abcd.dll

Have you checked the name of the dll inside the indicator it`s exactly the same as the dll name?
How could I see the source code of the EA ? thanks
Carlo
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
  #92 (permalink)  
Old 05-15-2008, 09:59 AM
Member
 
Join Date: Dec 2007
Location: Outside Stockholm
Posts: 45
ingvar_e is on a distinguished road
File replacement

I want to test an EA that makes use of external signals in the Strategy Tester and the thread states that the native filehandling does not work in the strategy tester. So I have tried to use the dll supplied in this thread. The input I want to process is in a file looking like this:

2007-01-02;EURUSD;2.InstPipDown;;Yes
2007-01-02;USDJPY;1.InstPipUp;;Yes
2007-01-02;USDCHF;1.InstPipUp;;Yes
2007-01-03;EURUSD;2.InstPipDown;;Yes
2007-01-03;EURUSD;4.PipMax1Down;;Yes
2007-01-03;GBPUSD;4.PipMax1Down;;Yes
2007-01-04;USDJPY;8.PipRevBear;;Yes
2007-01-05;EURUSD;5.PipMax2Up;;Yes
2007-01-05;USDJPY;1.InstPipUp;;Yes

I do create the file myself so I can use other types of delimiters.

How do I use the dll to get one "record" at the time? I can do the parsing for the individual fields.
How do I know when I have reached EOF?

I have tried a few variations but I get inconsistent results and sometimes garbage. Writing data as in the example works fine but I want to read data.
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
  #93 (permalink)  
Old 05-15-2008, 05:51 PM
Member
 
Join Date: Dec 2007
Location: Outside Stockholm
Posts: 45
ingvar_e is on a distinguished road
Well, perserverance rules!

After several hours I found out this:

The file handler refuses to open a file I have created with another program. Open returns -1. If I use the file that was created by the demo (mt4.log) and copies my content into it open works. Cant figure out why. Strange

I made my "records" fixed length and read the length of the "record" plus 2 to accomodate for "CRLF" at the end of each record. I got the length of the file, divided by the record length and looped to get all my records into an array:

Here is the code:

int init()
{

string inArr[500];
int file;
int filesize;
int records;
int i;

file = gFileOpen("c:\mt4.log",READ);
// Print(file);
filesize = gFileSize(file);
// Print(filesize);
records = filesize/25;
// Print(records);

for(i=1;i<=records;i++)
{
inArr[i-1] = gFileRead(file,25);
}

gFileClose(file);

Print(inArr[filesize-1]); //Check the last one

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
  #94 (permalink)  
Old 05-17-2008, 06:08 PM
Member
 
Join Date: Jan 2008
Posts: 50
PriNova is on a distinguished road
indicator with fileoutput

hello traders and programmers.

i need help with a codesegemnt for a new indicator.

the indicator should be able to write a file with relevant information, but it should only write after open a new candle. not every tick.

how could this be done? what i try to do is, on every new candle write OHCL of the last 1000 bars to train a PNN. this should be done outside with RAPID-I.
and with some other informations to learn what the probability the close of a candle could be.

please help. would be a great project, but so simple things i'm to stupid (or lazy) to do :-)

PriNova
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
  #95 (permalink)  
Old 05-17-2008, 06:27 PM
elitecamper's Avatar
Senior Member
 
Join Date: May 2007
Posts: 132
elitecamper is on a distinguished road
datetime timeprev=0; before init()

and

if(timeprev==Time[0])
return(0);
timeprev=Time[0]; right underneath start()

and thats it.
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
  #96 (permalink)  
Old 05-17-2008, 06:32 PM
Member
 
Join Date: Jan 2008
Posts: 50
PriNova is on a distinguished road
nice this was very fast reply.

thank you elitecamper
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
  #97 (permalink)  
Old 07-20-2008, 08:19 AM
Junior Member
 
Join Date: Dec 2006
Posts: 2
johnmcglaughlin is on a distinguished road
Why was the move function removed from the library

CodersGuru,

I can not tell you how valuable you are to me, You deserve much of the praise I receive from my clients, since without you I would not be able to do my job in support of them.

Is there a reason that the Move function was not implemented as is referenced in your tutorial.

Thanks Very Much Again four your service
John McGlaughlin
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
  #98 (permalink)  
Old 08-06-2008, 10:10 AM
Junior Member
 
Join Date: Aug 2008
Posts: 7
gorgoroth is on a distinguished road
gFileRead

Hello,

Looking the source code of mtguru1.dll I'have found that gFileRead() function should not work. Am I Wrong ?

gFileRead() uses a local variable to store the string read from the file. When the function returns, it returns a pointer to that variable, but this pointer can be a valid one because the local variable pbuffer goes out of scope.

So, from a MQL4 EA, an instruction like this should crash :

string buffer = gFileRead( handle, 50 );

and if it works it's strange ...


P.S.: I've posted this in the wrong thread, before. Create your own MetaTrader extension (dll).
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
  #99 (permalink)  
Old 08-08-2008, 10:24 AM
Junior Member
 
Join Date: Aug 2008
Posts: 7
gorgoroth is on a distinguished road
Errata Corrige:

.... but this pointer can be a valid one ....

but this pointer CANNOT be a valid one
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
  #100 (permalink)  
Old 10-10-2008, 04:52 PM
Junior Member
 
Join Date: Aug 2006
Posts: 8
Quantem is on a distinguished road
Smile Execute an exe file

Hi,

I want to do a simple thing (so I thought). I want to simply open (launch) an external program from an EA. (not in the EA)

So just for exampe purposes. Let us say I wanted to open Microsoft word when a certain thing happens in the EA.

I have doen this before but I cannot find the script, I have spent 2 hours searching the web. Next time I will save the code somewhere safe!
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
awesome, metatrader kernel32.dll, MT4 FILES, mtguru1.dll, mtguru1.zip


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
File Functions intelligent_14 Questions 6 07-11-2006 09:37 PM
Unusual Functions intelligent_14 Questions 3 06-24-2006 12:20 AM
Appendix 2 - Trading functions codersguru Lessons 8 12-26-2005 02:46 PM
Lesson 7 - Functions codersguru Lessons 2 11-02-2005 04:32 PM


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



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