Forex



Go Back   Forex Trading > Training > Metatrader > Metatrader 4 mql 4 - Development course > Questions
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
  #941 (permalink)  
Old 01-19-2008, 02:14 PM
ANCOLL's Avatar
Senior Member
 
Join Date: Nov 2006
Location: Indonesia
Posts: 252
ANCOLL is on a distinguished road
Quote:
Originally Posted by newdigital View Post
You can ask cja to make it smaller on this thread Signal_Bars_v7
Why cja is posting ex4 codes only with banner - please read those 2 threads:
eBay
Interesting ????
I see..
Even the Dolly and DIN where I, cja, minime, and others have worked together, have been ripped and sell by those thieves on the net.

Last edited by ANCOLL; 01-19-2008 at 04:28 PM.
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
  #942 (permalink)  
Old 01-20-2008, 05:53 AM
willmalou's Avatar
Member
 
Join Date: Apr 2006
Posts: 44
willmalou is on a distinguished road
Problem with ICUSTOM

This is the error that I get when I run my EA
GannHiLov1 EURJPYm,M30: invalid index buffer number in iCustom function

this is my Icustom function
double GannBuy1 = iCustom(NULL, 0, "###gann_hilo_activator###", lookback1,0);

Does anyone know how to fix 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
  #943 (permalink)  
Old 01-22-2008, 08:50 PM
Junior Member
 
Join Date: Dec 2007
Posts: 8
manu29 is on a distinguished road
For codersguru and others programmers

Hi all,

Please could you help me with my problem described here

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
  #944 (permalink)  
Old 01-23-2008, 03:52 AM
Junior Member
 
Join Date: Apr 2007
Posts: 3
Nelson7 is on a distinguished road
Continuous alert

I was wondering what code and where to add it, if I want any indicator to sound, email, alert until I shut it off. I'm away from my computer at times and use text messages and sound to alert me whether awake or asleep. One sound or text message is not always enough to get my attention.

Thank you ahead of time
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
  #945 (permalink)  
Old 01-23-2008, 04:18 AM
Junior Member
 
Join Date: Nov 2007
Posts: 3
Neal is on a distinguished road
adx voice alert

hello, I was wondering if anyone can help me make an indicator that will give me a sound once the adx line is above 40?


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
  #946 (permalink)  
Old 01-23-2008, 06:04 AM
Putz's Avatar
Junior Member
 
Join Date: Aug 2006
Posts: 24
Putz is on a distinguished road
iCustom at end of bar or?

Hi All,

I've been trying to confirm that the iCustom uses the values at the close of the bar or does it calculate it after every tick? It is not totally clear in the documentation. It seems that some functions like iMa allow you to specify at which time in the bar that you want the value to be taken.

I have the following iCustom and would like to know if it is the value of StochRSICurr at the end of the daily bar or not?

StochRSICurr = iCustom(Symbol(),PERIOD_D1,"Stochastic RSI",8,8,9,0,0);

Thanks for your help.
Putz
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
  #947 (permalink)  
Old 01-23-2008, 08:08 AM
ralph.ronnquist's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 297
ralph.ronnquist is on a distinguished road
The short answer is No.

As always, bar 0 is temporally incomplete for both EAs and indicators, and its high, low, close and volume are almost certainly different from how they end up when that bar completes and becomes bar 1. More exactly, the value of StochRSICurr at the end of the daily bar is only known at the first tick of the next daily bar (and later). I think you do yourself a disservice trying to use bar 0 values, since these, with few exceptions, only reflect the partial state of the incomplete bar.

As far as I know, the indicator gets invoked at the time of the first iCustom call with the particular parameter value combination, during each EA start() function invocation. Successive iCustom calls during the one EA start function call, to the same indicator, with the same parameter value configuration, reuses whatever the first call produced. The next EA start() function, again calling iCustom, will again invoke the indicator, in the context of the tick that caused the start function to be invoked.

Thus, in the eyes of the indicator, it gets invoked once for each tick that the EA lets it get invoked for. By telling an MA to use open price or high price etc only changes which bar values it looks at, while the manner of invocation will remain the same: it is invoked at every tick (that the EA lets 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
  #948 (permalink)  
Old 01-23-2008, 05:27 PM
Junior Member
 
Join Date: Jan 2008
Location: Brooklyn
Posts: 22
bdht is on a distinguished road
Question Is it possible or is there a such EA

Hello there, team.

Is there an EA [or is there a way] that could:
-work in bars [not in ticks];
-follow two indicators, one of which has 1 line, the other has 2 lines;
-make a certain order when the first indicator crosses its zero level, automatically closing a corresponding order [if there is any];
-make a certain order when the second indicator's lines cross each other, again automatically closing a corresponding order [if there is any].
Simply b/c I only have a few posts doesn't mean that I'm looking for some free advice or looking for benefiting from fill-in-the-blank-here. I'm not asking anybody to code anything. What I am asking for is help [just like Joe Bauers in Idiocracy]. Just point me in the right direction. I already have the code that I've written a couple of days ago, hich isn't working [of course!]

Here's the code:

Code:
#property copyright "Copyright © 2008 BDHT"
#define MAGIC 689

//do not take into consideration
//the names of the indicators
//they're fabricated

extern double lots = 0.1; // Lots
extern double TP = 140; // Take Profit
extern double SL = 30; // Stop Loss
static int prevtime = 0;
static int res = 0;
double IND2_line1, IND2_line2, IND1, IND1_prev, IND2_line1_prev;

int init() {  
   IND2_line1 = iIND2_line1(NULL,0,0,MODE_MAIN,0);
   IND2_line2 = iIND2_line2(NULL,0,0,MODE_SIGNAL,0);
   IND1= iCustom(NULL, 0, "IND1", 0, 0, 0);
   IND1_prev= iCustom(NULL,0, "IND1", 0, 0, 1);
   IND2_line1_prev = iCustom(NULL, 0, "IND2", 0, 0, 1);
   return(0);
}
int deinit() {
   return(0);
}

int start() {
//Make sure there are no open orders; if yes - stop
if (OrdersTotal() > 0) 
      return (0);
      
if (IND1< 0 && IND1 < IND1_prev && IND1_prev > 70 && IND2_line1 < 0 && IND2_line2 < 0) { 
// 70 may be 10; simply means that the IND1_prev was greater than 0
      res=OrderSend(Symbol(),OP_SELL,lots,Bid,3,Bid+SL*Point,Ask+TP*Point,"My EA",MAGIC,0,Blue);
      return(0);
}
if (IND2_line1 > IND2_line2 && IND2_line1_prev < IND2_line1) {
      res=OrderSend(Symbol(),OP_BUY,lots,Ask,3,Ask+SL*Point,Bid+TP*Point,"My EA",MAGIC,0,Blue);
      return(0);
}
Now, I'm sure that there will be problems down the line b/c I don't have any practical C/C++ knowledge. However, if I have time, I will most certainly post updates here.

One more thing: I got a little help from phy in MQL forums: he says that "code within start() executes every tick" and "code within init() is only executed one time or once per intitialization/start/restart of the EA". Am I getting this correctly: a tick is any change of price. A bar has many ticks. A M1 bar may have 60 seconds [or so] worth of ticks and a M5 bar may have 60 seconds * 5 instances/minutes worth of ticks. I do not want the code to pay attention to each and every tick there is; I just want the bar to make the difference. Where should I put the Time[0] to replace the tick movement following w/ that of bar's?

Can anybody help?
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
  #949 (permalink)  
Old 01-23-2008, 06:33 PM
Junior Member
 
Join Date: Dec 2007
Posts: 8
manu29 is on a distinguished road
Please help me

Hi all,

Nobody want to help me. I post one more time my problem and please help me.
I just want understand why the result is not the with the two ways of coding the same indicator (see the code and picture).


[IMG]C:\Program Files\MetaTrader 4\tester\hull_anticip.gif[/IMG]

Manuel
Attached Images
File Type: gif hull_anticip.gif (24.3 KB, 166 views)
Attached Files
File Type: mq4 HULL_ANTICIP.mq4 (3.8 KB, 15 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
  #950 (permalink)  
Old 01-27-2008, 07:21 AM
Putz's Avatar
Junior Member
 
Join Date: Aug 2006
Posts: 24
Putz is on a distinguished road
slow backtesting

Just wanted to say thanks Ralph Ronnquist. I now have that part functioning properly.

I do have another question for anybody who can help. When I try to use Strategy Tester with my EA, it is extremely slow. I know it works as i do get some results but I need to leave it on overnight to get 3 month's of results.

My EA is based on daily trend using Stochastic RSI crossing (testing) and then only price action. What could be the main reasons of it being so slow. Is it in the programming or is it because I'm calling an outside indicator or is it that Stochastic RSI swallows a lot of power.

I run many other EA's and they are all a lot faster than mine. My system is plenty powerful with 3GB of Ram and Intel Centrino Duo processor.

Any suggestions of ideas would be appreciated.

Putz
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
forex, histogram, JMASlope, ToR 1.20, ZUP_v1.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


All times are GMT. The time now is 02:34 PM.



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