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
  #511 (permalink)  
Old 11-26-2007, 08:48 AM
Senior Member
 
Join Date: Dec 2005
Location: In front of my trading desk
Posts: 348
Devil2000 is on a distinguished road
What is "clock"? as far I know there's no "clock" function in MQL4.

You can try this
Code:
if(TimeHour(TimeCurrent())==7)
 {
   if(TimeMinute(TimeCurrent())==15) B== 1;
   if(TimeMinute(TimeCurrent())==30) B== 2;
   if(TimeMinute(TimeCurrent())==45) B== 3;
 }
if(TimeHour(TimeCurrent())==8)
 {
   if(TimeMinute(TimeCurrent())==0)  B== 4;
   if(TimeMinute(TimeCurrent())==15) B== 5;
   if(TimeMinute(TimeCurrent())==30) B== 6;
 }
__________________
Need a professional MQL4 programmer? PM me
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
  #512 (permalink)  
Old 11-26-2007, 09:30 AM
Senior Member
 
Join Date: Mar 2006
Location: La Verne,CA
Posts: 560
MrPip is on a distinguished road
Quote:
Originally Posted by Devil2000 View Post
What is "clock"? as far I know there's no "clock" function in MQL4.

You can try this
Code:
if(TimeHour(TimeCurrent())==7)
 {
   if(TimeMinute(TimeCurrent())==15) B== 1;
   if(TimeMinute(TimeCurrent())==30) B== 2;
   if(TimeMinute(TimeCurrent())==45) B== 3;
 }
if(TimeHour(TimeCurrent())==8)
 {
   if(TimeMinute(TimeCurrent())==0)  B== 4;
   if(TimeMinute(TimeCurrent())==15) B== 5;
   if(TimeMinute(TimeCurrent())==30) B== 6;
 }
Of course I thought he had

datetime clocks = TimeCurrent();

in an earlier line.

Robert
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
  #513 (permalink)  
Old 11-26-2007, 10:17 AM
Senior Member
 
Join Date: Dec 2005
Location: In front of my trading desk
Posts: 348
Devil2000 is on a distinguished road
Quote:
Originally Posted by MrPip View Post
Of course I thought he had

datetime clocks = TimeCurrent();

in an earlier line.

Robert
Really? I can't find it on the previous page.
That should be working. But in an hour, sometimes there will be some minutes missing due to your internet connection or server's lag.
__________________
Need a professional MQL4 programmer? PM me
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
  #514 (permalink)  
Old 11-26-2007, 11:53 PM
Junior Member
 
Join Date: Apr 2006
Posts: 17
slam is on a distinguished road
Looking for Programmer to convert indicator to EA

Hello All,

I am looking for a programmer to convert an indicator into an expert advisor (or a stand alone EA that works with the existing indicator). It simply needs to either buy or sell where the signal is generated, and have the following in the abilities in the presets:

*Lot sizing
*Stop loss setting
*Trailing stop setting
*Money management lot sizing based on account balance.

Attached is a picture of the indicator.

Please PM me if you are interested in the project, or know someone who is.

Thanks in advance.
Attached Images
File Type: gif indicator.gif (22.7 KB, 194 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
  #515 (permalink)  
Old 11-27-2007, 02:36 AM
Senior Member
 
Join Date: Oct 2006
Posts: 104
antone is on a distinguished road
Quote:
Originally Posted by Devil2000 View Post
Really? I can't find it on the previous page.
That should be working. But in an hour, sometimes there will be some minutes missing due to your internet connection or server's lag.
sorry for the confusion this is the code for the Clocks so i can change with different GMT

Quote:
double Clocks = TimeCurrent() - (Broker)*3600;
broker is broker time in GMT..

another problem code i need guys.. sorry if i ask too much..

my problem :
i want that it will only open a max of 1 floating sell and 1 floating buy in a day.. but can open more than a lot of buy or sell in a day.. if the EA runs three days and everyday order conditions are met then it will have 3 floating buy/sell or 6 floating buy and sell..

example:
DAy 1 = open a 1 buy hits Tp and open another buy = 1 buy still open
Day 2 = previous buy still open and open another buy = 2 buys still open
Day 3 = 2 buys still open and another buy open = 3 buys still open


Quote:
for(int i=0;i<OrdersTotal();i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES) == false) break;
if(OrderSymbol()== Symbol () && OrderMagicNumber()== Magic_Number)
{
if(OrderType() == OP_BUY) buys++;
if(OrderType() == OP_SELL) sells++;
}
}

if (buys < 1) it orders a buy
if (sells < 1) it orders a sell when the conditions are met

Last edited by antone; 11-27-2007 at 05:18 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
  #516 (permalink)  
Old 11-27-2007, 09:10 AM
Senior Member
 
Join Date: Feb 2006
Posts: 587
Michel is on a distinguished road
You can use this to count only those which are opened today:
PHP Code:
if(OrderType() == OP_BUY && OrderOpenTime() >= iTime(NULLPERIOD_D10)) buys++; 
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
  #517 (permalink)  
Old 11-29-2007, 04:36 AM
Senior Member
 
Join Date: Nov 2006
Posts: 237
teldon is on a distinguished road
need quick help

i have these codes below.....
can somebody please check to see if they follow this rule...

If no trades on the chart then with signal it opens 1 lot.
if 1 trade already on the chart all the rest of the orders are double lot..

please verify,

total = OrdersTotal();
if(total>=2)
{
if(MA11>MA21 && MA12<MA22)
{
ticket=OrderSend(Symbol(),OP_BUY,2*Lots,Ask,5,Ask-stoploss*Point,0,0,Magic_number,0,Green);
return (0);
}
if(MA11<MA21 && MA12>MA22)
{
ticket=OrderSend(Symbol(),OP_SELL,2*Lots,Bid,5,Bid +stoploss*Point,0,0,Magic_number,0,Red);
return (0);
}
}
if(MA11>MA21 && MA12<MA22)
{
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,5,Ask-stoploss*Point,0,0,Magic_number,0,Green);
}
if(MA11<MA21 && MA12>MA22)
{
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,5,Bid+s toploss*Point,0,0,Magic_number,0,Red);
}
}
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
  #518 (permalink)  
Old 11-29-2007, 08:13 AM
kjhfdgjfhdghdf's Avatar
Senior Member
 
Join Date: Mar 2007
Posts: 686
kjhfdgjfhdghdf is on a distinguished road
Talking

Martingale?
You have no hope.....
__________________
No
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
  #519 (permalink)  
Old 11-29-2007, 09:48 AM
Senior Member
 
Join Date: Nov 2006
Posts: 237
teldon is on a distinguished road
Quote:
Originally Posted by kjhfdgjfhdghdf View Post
Martingale?
You have no hope.....
i will keep it in mind, thx
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
  #520 (permalink)  
Old 11-29-2007, 01:36 PM
Senior Member
 
Join Date: Oct 2006
Posts: 104
antone is on a distinguished road
i just change and added.. the red characters.. hope that helps..

Quote:
total = OrdersTotal();
if(total>=1)
{
if(MA11>MA21 && MA12<MA22)
{
ticket=OrderSend(Symbol(),OP_BUY,2*Lots,Ask,5,Ask-stoploss*Point,0,0,Magic_number,0,Green);
return (0);
}
if(MA11<MA21 && MA12>MA22)
{
ticket=OrderSend(Symbol(),OP_SELL,2*Lots,Bid,5,Bid +stoploss*Point,0,0,Magic_number,0,Red);
return (0);
}
}
if(total<1)
{
if(MA11>MA21 && MA12<MA22)
{
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,5,Ask-stoploss*Point,0,0,Magic_number,0,Green);
}
if(MA11<MA21 && MA12>MA22)
{
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,5,Bid+s toploss*Point,0,0,Magic_number,0,Red);
}
}
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 09:39 PM.



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