Go Back   Forex-TSD > Programming > MetaTrader Programming
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
  #1751 (permalink)  
Old 04-22-2009, 09:19 PM
Junior Member
 
Join Date: Apr 2007
Posts: 23
reza1982 is on a distinguished road
how to code two indicators cross with different scales

how to code two indicators cross with different scales?
i want 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
  #1752 (permalink)  
Old 04-22-2009, 11:27 PM
ajk's Avatar
ajk ajk is offline
Senior Member
 
Join Date: Dec 2005
Posts: 261
ajk is on a distinguished road
I will give anything a shot. Its strange because coder guru coded the ea and I modified. I looked through tons' of ea's and can't find anything.
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
  #1753 (permalink)  
Old 04-22-2009, 11:58 PM
ajk's Avatar
ajk ajk is offline
Senior Member
 
Join Date: Dec 2005
Posts: 261
ajk is on a distinguished road
any suggestion on how to write the code after the
void TrailOrder(int type)

calling function?
Maybe take out function completely and use external e trailing ea...argh>!

Last edited by ajk; 04-23-2009 at 12:06 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
  #1754 (permalink)  
Old 04-23-2009, 06:14 AM
Senior Member
 
Join Date: Oct 2008
Location: Vancouver, BC
Posts: 166
Roger09 is on a distinguished road
Quote:
Originally Posted by ajk View Post
any suggestion on how to write the code after the
void TrailOrder(int type)

calling function?
Maybe take out function completely and use external e trailing ea...argh>!
If you want I can fix your EA. Send me it on 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
  #1755 (permalink)  
Old 04-23-2009, 09:44 AM
Junior Member
 
Join Date: Jun 2008
Posts: 1
zarvula is on a distinguished road
Talking after first cross set several bars distance

Hi to all programmer guru's here i am a newbie in mql4 programming and i stuck on a problem,
so it is the following :
i have 2 EMA 5 and 20 PERIOD_15 and respectivly 5 and 20 EMA on PERIOD_H1.
So when i am entering a posision with the first cross PERIOD_M15, the advisor close the position immediatly in the same bar if the prise move the other way and made a reverse cross. This is programmatically correct, but my acctual problem is to wait for the next 1-2 or more bars and then close the position if cross found.

So can you help me to do that ? if some related topic with the same problem is here, can you send me a link
and the Moderators can remove the post .
thx in advance!!


--if you allready have an open position
-- if too much crosses occurs
-- wait a little bit before exit of this position
--this should solve the repeated crosses in one bar

if(firstCross == 1)
{
---------------------------//Close, check if next several bar's printed after OpenOrderPrise()-----------------------------------
if(openbar <= closebar)
{
OrderClose(OrderTicket(),OrderLots(),Ask,3,Red); // close position
return(0); // exit
}else
return(0);
}
well i found some creepy solution i've allready attached

If you have some optimizing ideas for time shifting or optimizing ideas in the code at all, i will appreciate any suggestions thx in advance
Attached Files
File Type: mq4 Indicator_EUR.mq4 (7.0 KB, 11 views)

Last edited by zarvula; 04-24-2009 at 09:45 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
  #1756 (permalink)  
Old 04-23-2009, 10:16 PM
Member
 
Join Date: Oct 2008
Posts: 68
wall03 is on a distinguished road
Atr decresing code ???

Atr decresing - what is the code mql4 ?

--------------------------------------------------------------------------------

Atr decresing

what is the code mql4 ?

I would like that the my ea not open positions if
the ATR d1 is > ATR d1 (-1)
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
  #1757 (permalink)  
Old 04-24-2009, 02:07 AM
1Dave7's Avatar
Senior Member
 
Join Date: Aug 2007
Posts: 185
1Dave7 is on a distinguished road
Red face How to code 3 levels of Trailing Stops

TrailingStop = 50;
TrailingStop_Over100 =30;
TrailingStop_Over150 = 20;


Level 1: 0-100 pip profit - TS is 50 pips

Level 2: 101-150 pip profit - TS changes to 30 pips

Level 3: 151+ pip profit - TS changes to 20 pips

How do I code this (Positive direction move) so the TS will change once pip profit increases??

Dave
<><<<

Really would appreciate the expertise of a coder.

Last edited by 1Dave7; 04-24-2009 at 02: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
  #1758 (permalink)  
Old 04-30-2009, 06:02 PM
Senior Member
 
Join Date: Sep 2008
Posts: 106
Fx Referee is on a distinguished road
Need your help

Hi traders,

I will really appreciate it if someone can help me to develop alert to this indicator ( MT4-LevelStop-Reverse-vB0-3).

I wants the alert to ring immediately the arrow show up.

Thanks in advance.
Attached Files
File Type: ex4 MT4-LevelStop-Reverse-vB0-3.ex4 (6.7 KB, 18 views)

Last edited by Fx Referee; 04-30-2009 at 06:05 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
  #1759 (permalink)  
Old 05-02-2009, 07:24 AM
Member
 
Join Date: Jul 2008
Posts: 47
chiwing is on a distinguished road
how to code some uneliminateAble text on chart

hi,

i use your lucky v2, and want to know the code of adding text on the chart which is not using the object--label-->see the pic ~~
and user cannot del the text~ ~

the text is being like that-- "Your lucky v2 EA is free and still on developing..."


how to code it?
thanks
Attached Images
File Type: jpg how to code.JPG (133.0 KB, 93 views)

Last edited by chiwing; 05-02-2009 at 10:17 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
  #1760 (permalink)  
Old 05-02-2009, 07:39 AM
Senior Member
 
Join Date: Oct 2008
Location: Vancouver, BC
Posts: 166
Roger09 is on a distinguished road
Quote:
Originally Posted by chiwing View Post
hi,


i use your lucky v2, and want to know the code of adding text on the chart which is not using the object--label-->see the pic ~~
and user cannot del the text~ ~

the text is being like that-- "Your lucky is free and still on developing..."


how to code it?
thanks
Use command Comment()
Comment - MQL4 Documentation
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, crossover, dll, eli hayun, Eur_harvester.ex4, expert adviser, expert advisor, forex, Gann Hilo, higher high, how to code, indicator, I_XO_A_H, kehedge, mechanical trading, metatrader command line, mql4, mt4, MT4-LevelStop-Reverse, OrderReliable.mqh, programming, rectangle tool, strings, time range high low, 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 04:22 PM


All times are GMT. The time now is 01:42 AM.



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