Forex



Go Back   Forex Trading > Training > Metatrader > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register More recent 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
  #1551 (permalink)  
Old 08-11-2009, 11:11 AM
Junior Member
 
Join Date: Jun 2009
Posts: 10
mallet52 is on a distinguished road
here is my ea that I forgot to add in last post
Attached Files
File Type: mq4 phoenix_ea_v5_6_04.mq4 (34.3 KB, 4 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
  #1552 (permalink)  
Old 08-11-2009, 11:16 AM
mladen's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,278
mladen is on a distinguished road
...

The way it has to be coded is not to use the delay (delay will not help in cases like these) but to break apart new order placement into two parts :
1. Placing orders without stop loss and/or take profit
2. Placing stop loss and/or take profit in separate step (when and only when an order is already accepted)
__________________________________

Now, Phoenix EA is doing that operation on 10 separate places and all of them would need to be rewritten (or the logic of the EA placing orders should be rewritten in order to be able to control potential errors strictly, and so on, and so on...) Right now I do not have the time to do the complete rewriting (it would require more time in order to do it right), so I can not promise you that I will do that .

regards
mladen

Quote:
Originally Posted by mallet52 View Post
Hey guys,
I still haveing trouble getting my ea to work with fxcm bt,they tell me that I have a problem with the ea placing sl ant tp at the same time it puts in a market order,
Mladen kindly recoded this ea for so it would accept the 5 digit pricing and now this problem came up,
It would be great if somone could code the delay in to the ea that is needed for me,or explain it in great detail ( as I have no knowalge on how to code) and I will have a go at it myself, so I don't have to keep bothering everyone else.
thankyou in advance
and to all those who have helped me in the past
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
  #1553 (permalink)  
Old 08-11-2009, 12:18 PM
newcoder's Avatar
Junior Member
 
Join Date: Jul 2009
Posts: 12
newcoder is on a distinguished road
Original Mov. Ave to be placed in seperate window

I tried to change the one line of original code for the Moving Average that comes with MetaTrader 4 and place it in a seperate window but when I do it does not show all the options that I would like to have that comes with the original code i.e. like [ Ma method 'simple'] and apply to 'close' or open etc...

What am I doing wrong?

Thanks so much.
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
  #1554 (permalink)  
Old 08-11-2009, 12:21 PM
mladen's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,278
mladen is on a distinguished road
...

You are not doing anything wrong
Metatrader, for now (it is going to be changed in version 5) does not allow those "descriptive" parameter entries in custom indicators (so, the non-built-in indicators).

Quote:
Originally Posted by newcoder View Post
I tried to change the one line of original code for the Moving Average that comes with MetaTrader 4 and place it in a seperate window but when I do it does not show all the options that I would like to have that comes with the original code i.e. like [ Ma method 'simple'] and apply to 'close' or open etc...

What am I doing wrong?

Thanks so much.
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
  #1555 (permalink)  
Old 08-12-2009, 09:55 AM
Junior Member
 
Join Date: Jun 2009
Posts: 10
mallet52 is on a distinguished road
Quick thankyou to mladen

Thankyou for helping me out mladen,your help is much apricated,
I tried sending you a pm but can't for some reason
anyway, thanks again
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
  #1556 (permalink)  
Old 08-15-2009, 05:46 AM
Junior Member
 
Join Date: Jul 2009
Location: Indonesia
Posts: 5
V-Force is on a distinguished road
Custom Indicator Alert Frequency

I am new to mq4 and i am trying to create a display on screen when there is a crossover for my custom MACDs. Below is my code but the alerts keep poping up every few minutes.

How can i code it to display alerts only once every hour? Or one alert per bar?

//--------------------------
int start()
{
string MACD1="";
color colt9;
double MACDM_S10 = iCustom(NULL, PERIOD_H1, "MACD", 8,17,9, MODE_MAIN, 0);
double MACDS_S10 = iCustom(NULL, PERIOD_H1, "MACD", 8,17,9, MODE_SIGNAL,0);
double MACDM_S11 = iCustom(NULL, PERIOD_H1, "MACD", 8,17,9, MODE_MAIN, 1);
double MACDS_S11 = iCustom(NULL, PERIOD_H1, "MACD", 8,17,9, MODE_SIGNAL,1);

if ((MACDM_S11 < MACDS_S11 && MACDM_S10 < MACDS_S10)) { MACD1="IN UPTREND"; colt9=LimeGreen; }
if ((MACDM_S11 > MACDS_S11 && MACDM_S10 > MACDS_S10)) { MACD1="IN DOWNTREND"; colt9=Red; }
if ((MACDM_S11 > MACDS_S11 && MACDM_S10 < MACDS_S10)) { MACD1="NEW UP CROSSING"; colt9=LimeGreen; }
if ((MACDM_S11 < MACDS_S11 && MACDM_S10 > MACDS_S10)) { MACD1="NEW DOWN CROSSING"; colt9=Red; }

string MACD2="";
color colt14;
double MACDM_L10 = iCustom(NULL, PERIOD_H1, "MACD", 12,26,9, MODE_MAIN, 0);
double MACDS_L10 = iCustom(NULL, PERIOD_H1, "MACD", 12,26,9, MODE_SIGNAL,0);
double MACDM_L11 = iCustom(NULL, PERIOD_H1, "MACD", 12,26,9, MODE_MAIN, 1);
double MACDS_L11 = iCustom(NULL, PERIOD_H1, "MACD", 12,26,9, MODE_SIGNAL,1);

if ((MACDM_L11 < MACDS_L11 && MACDM_L10 < MACDS_L10)) { MACD2="IN UPTREND"; colt14=LimeGreen; }
if ((MACDM_L11 > MACDS_L11 && MACDM_L10 > MACDS_L10)) { MACD2="IN DOWNTREND"; colt14=Red; }
if ((MACDM_L11 > MACDS_L11 && MACDM_L10 < MACDS_L10)) { MACD2="NEW UP CROSSING"; colt14=LimeGreen; }
if ((MACDM_L11 < MACDS_L11 && MACDM_L10 > MACDS_L10)) { MACD2="NEW DOWN CROSSING"; colt14=Red; }


if(MACD1=="NEW UP CROSSING"&&MACD2=="IN UPTREND")
Alert(Symbol()," - ","H1:"," MACD MAIN UPTREND MOVEMENT"," at ", Bid, " - ",TimeToStr(CurTime(),TIME_SECONDS));
if(MACD1=="NEW DOWN CROSSING"&&MACD2=="IN DOWNTREND")
Alert(Symbol()," - ","H1:"," MACD MAIN DOWNTREND MOVEMENT"," at ", Bid, " - ",TimeToStr(CurTime(),TIME_SECONDS));


if(MACD2=="NEW UP CROSSING"&&MACD1=="IN UPTREND")
Alert(Symbol()," - ","H1:"," MACD, MAIN TREND CHANGE TO UPTREND"," at ", Bid, " - ",TimeToStr(CurTime(),TIME_SECONDS));
if(MACD2=="NEW DOWN CROSSING"&&MACD1=="IN DOWNTREND")
Alert(Symbol()," - ","H1:"," MACD, MAIN TREND CHANGE TO DOWNTREND"," at ", Bid, " - ",TimeToStr(CurTime(),TIME_SECONDS));


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
  #1557 (permalink)  
Old 08-23-2009, 01:37 PM
increase's Avatar
Senior Member
 
Join Date: May 2006
Posts: 845
increase is on a distinguished road
Hi Can anyone tell me how to get rid of the periods on this indicator?
Attached Images
File Type: jpg pic.JPG (62.7 KB, 80 views)
__________________
New to Forex? Get all you need for Free at my site Click Here
You can also get my Hot Forex System (scroll to the bottom of the page): Click Here
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
  #1558 (permalink)  
Old 08-24-2009, 03:04 AM
Senior Member
 
Join Date: Nov 2006
Posts: 308
luxinterior is on a distinguished road
Quote:
Originally Posted by increase View Post
Hi Can anyone tell me how to get rid of the periods on this indicator?
Set the label property of each of the buffers to an empty string.

Code:
SetIndexLabel(0,"");
You can also set the IndicatorShortName to an empty string to get rid of that if you want.

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
  #1559 (permalink)  
Old 08-24-2009, 03:17 PM
increase's Avatar
Senior Member
 
Join Date: May 2006
Posts: 845
increase is on a distinguished road
Quote:
Originally Posted by luxinterior View Post
Set the label property of each of the buffers to an empty string.

Code:
SetIndexLabel(0,"");
You can also set the IndicatorShortName to an empty string to get rid of that if you want.

Lux
Thanks thats great just need to fix the bar label please
Attached Images
File Type: jpg pic.JPG (16.3 KB, 73 views)
__________________
New to Forex? Get all you need for Free at my site Click Here
You can also get my Hot Forex System (scroll to the bottom of the page): Click Here
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
  #1560 (permalink)  
Old 08-26-2009, 02:22 PM
Junior Member
 
Join Date: Mar 2009
Location: Slovenia
Posts: 11
Chistabo is on a distinguished road
Trade once per Bar

Ola!

Thank you, all CodeMasters, for your help.

Problem:
EA enters trades per Fractals signals, exits by Heiken Achi Smoothed.
Every now and then both indicators fight - Fractals opens a trade, Heiken closes it imediately... constantly on one bar (Balance goes waaay down).

I would like to code EA to only trade once per bar, like if there is order in History on current day, no more trading for today.

Thank you for your cooperation,

Have fun,

Simon
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 12:19 AM.



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