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
  #1071 (permalink)  
Old 07-04-2008, 06:00 PM
Member
 
Join Date: Oct 2006
Posts: 80
Big Be is on a distinguished road
To Lux, ajk, Raygun, Devil2000, IN10TION

Thanks for the tips.
I will try them and I hope come up with the answer.
I will post later.

Big Be
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
  #1072 (permalink)  
Old 07-04-2008, 10:43 PM
TheRumpledOne's Avatar
Banned
 
Join Date: Nov 2006
Posts: 802
TheRumpledOne is an unknown quantity at this point
Quote:
Originally Posted by amatrader View Post
Hi there,

I hope you don't mind me butting in here, I'm looking at a similar situation and I have a thaught on the issue... what about if you code a loop at the end of your program that says "if no order is open run through again". and let it loop maybe 3 or 4 times.

If it does that then any missed orders (which happens quite often) should surely get picked up. or is there something wrong with my thinking.

I think it would look something like this...



I'm still new to this so if it doesn't make sense please explain to me why.
Hey, that's a good idea!

I could check the time and if X seconds or minutes have elapsed then exit the loop.

THANKS!!

P.S. This was not for an EA. I don't code EAs.
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
  #1073 (permalink)  
Old 07-04-2008, 11:07 PM
IN10TION's Avatar
Senior Member
 
Join Date: Mar 2007
Posts: 651
Blog Entries: 1
IN10TION is on a distinguished road
:: it will not work with indicators like that, even if you loop 1.000.000 times, it will stall everything else, nothing other then that loop will be processed, when the loop is finished then your terminal will continue her normal processes before a new tick.

:: in that 1.000.000 loop it's useless to check/control something else, that's why sleep() function doesn't work.
Quote:
Originally Posted by TheRumpledOne View Post
Hey, that's a good idea!

I could check the time and if X seconds or minutes have elapsed then exit the loop.

THANKS!!

P.S. This was not for an EA. I don't code EAs.
__________________
NEW UPDate! 04 Nov. 09 IN10TION newsReader v09.98 Lite - the best forex news reader on your chart
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
  #1074 (permalink)  
Old 07-05-2008, 12:55 AM
Junior Member
 
Join Date: Apr 2008
Posts: 5
paco99 is on a distinguished road
Running a MetaTrader script from the command line

I want to be able to run a script or program from the command line that will execute a buy order. There aren't any rules. When I type it in from the command line, it should buy 1 EURUSD Long position.

How can this be done?


Thanks,

paco
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
  #1075 (permalink)  
Old 07-06-2008, 05:06 PM
Junior Member
 
Join Date: Jan 2008
Location: Brooklyn
Posts: 22
bdht is on a distinguished road
Simple arrow based indicator and EA

Hi, Everyone.

Recently I was trying to make a simple EA that would work on an arrow-based indicator. I am trying to make the EA to maintain one order at any given time. If the arrow points down, the previous buy order is closed and sell order is opened. If the arrow points up, the previous sell order is closed and buy order is opened. I am using the tester (visualization mode) to verify my code. It seems that no matter how I try, the EA does not close and open the positions when arrow indicator points up or down. The back test confirms that the EA is not working properly. Instead of opening and closing the orders at the arrow points shown by the indicator, the EA closes/opens order at some different time. I cannot understand why my code doesn't work.

In the beginning of start statement, I have the following code:

if (Time[0] == savedTime) {
return (0);
} else {
savedTime = Time [0];
}

This (I hope) will ensure that the code in the start statement is executed only when new bar has formed. Later in the body of the start subroutine, I query the indicator with iCustom function. The request looks as below:

iCustom (... 1)

The last argument of one specifies the previous formed bar, which is why it is not 0. Yet later I close the opened order with OrderClose and open new one with OrderSend. I suppose that both functions must be able to execute instantaneously.

The bottom line is: I am trying to create an EA based on arrow indicator. The indicator points either up or down. The way I see it (and I am probably incorrect), the only thing that I need to do is to close previous order and open new one when the next bar has formed. I would greatly appreciate any input into this problem.

Thanks to all.
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
  #1076 (permalink)  
Old 07-06-2008, 05:48 PM
onetarmizi's Avatar
Senior Member
 
Join Date: Apr 2007
Posts: 189
onetarmizi is on a distinguished road
Anybody can tell me how to code for putting expiry date in the indicator?

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
  #1077 (permalink)  
Old 07-06-2008, 05:59 PM
Administrator
 
Join Date: Sep 2005
Posts: 20,058
Blog Entries: 241
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Look at this thread How to LOCK/Encrypt EA
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
  #1078 (permalink)  
Old 07-06-2008, 06:07 PM
onetarmizi's Avatar
Senior Member
 
Join Date: Apr 2007
Posts: 189
onetarmizi is on a distinguished road
Quote:
Originally Posted by newdigital View Post
Look at this thread How to LOCK/Encrypt EA
Thanks for that link. Finally I was found the page that I'm looking for 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
  #1079 (permalink)  
Old 07-06-2008, 10:09 PM
Senior Member
 
Join Date: Oct 2007
Posts: 230
Dave137 is on a distinguished road
Smile How-To Get 2 Indicators on 1-seperate window??

Can somebody refresh my mind on how to get 2-indicators on one seperate window so they overlap each other??

Thanks for you assistance in advance!

Dave

Last edited by Dave137; 07-06-2008 at 10:11 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
  #1080 (permalink)  
Old 07-07-2008, 12:10 AM
Junior Member
 
Join Date: Jun 2008
Posts: 3
ryan56 is on a distinguished road
EA needed to open orders only

Hi All,

I was just wondering if anyone could help me create an EA that just opens 4 different orders at 00:00AM GMT for any pair.
1 lot buy
1 lot buy
1 lot sell
1 lot sell
to be opened all at 00:00GMT

thanks for assistance

Ryan56
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: 5 (2 members and 3 guests)
bobcat1_02, slingertje
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 12:35 AM.



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