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
  #1261 (permalink)  
Old 09-03-2008, 06:39 AM
Junior Member
 
Join Date: Feb 2008
Posts: 10
litcons is on a distinguished road
Need favor from a coder..ryanklefas??

I have no idea how to write code, I just need a couple more imputs and an extra indicator added to the united ea (attached)

Added imputs:

more entry options:

1. Enter on fresh signal: true or false, if true a trade would only happen at a fresh signal not in the middle or at the end
2. option to pick what indicator I want entry on
3. Lock in Pip amount
4. option of trailing stop to begin at x number of pips in profit

One more indicator added to for confirmation as well as entry and exit options:

HMA indicator ( attached)

Thanks in advance for coding help,

Mike
Attached Files
File Type: ex4 HMA.ex4 (4.1 KB, 8 views)
File Type: mq4 United_EA_v1.1.mq4 (19.1 KB, 21 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
  #1262 (permalink)  
Old 09-03-2008, 02:53 PM
Senior Member
 
Join Date: Jan 2006
Posts: 1,119
omelette is on a distinguished road
@dan7567 - what you ask is not possible, MT uses the current brokers time and this cannot be changed. If you have the souce-code, it is much easier to just alter the time trades are opened, rather then contemplating the impossible...

@fireslayer26 - adding sl/tp code is easy - either include SL price (assuming a BUY - 'OrderOpenPrice() - SL_Pips * Point') in the OrderSend() function or modify an already open order with OrderModify() function. Ditto for TP's. The trailing stop is slightly more complicated but there are literally hundreds of EA's freely available that implement these functions...

@forexarchitect - what you are asking makes no sense - first, the code you provide is a partial custom function, that is passing pre-defined system variables (OP_BUY, OP_SELL, the values you are interested in it appears...) to another custom function which you do not include...

@litcons - not meaning to sound fasicious but the thread title is "how to code", whereas you matter-of-factly tells us you cannot code at all and are looking for someone to code an EA for you, practically from scratch - maybe the "coders for hire" thread would prove more receptive...
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
  #1263 (permalink)  
Old 09-03-2008, 06:36 PM
Junior Member
 
Join Date: Feb 2008
Posts: 10
litcons is on a distinguished road
sorry about posting at the wrong thread, I should have uploaded the indicators for review, it would have made more sense,
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
  #1264 (permalink)  
Old 09-05-2008, 10:10 PM
Senior Member
 
Join Date: Oct 2007
Posts: 230
Dave137 is on a distinguished road
Question Help with #property indicators

I am trying to code an indicator to change the indicator color using a "if" conditional statement with no success.

PHP Code:
if(PeakUp==True)
{
#property indicator_color4 Lime
}
if(
PeakUp==True)
{
#property indicator_color3 CLR_NONE
}


if(
PeakUp==False)
{
#property indicator_color4 CLR_NONE
}
if(
PeakUp==False)

{
#property indicator_color3 Red


Can anybody help??


Dave
<><<<
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
  #1265 (permalink)  
Old 09-05-2008, 10:58 PM
IN10TION's Avatar
Senior Member
 
Join Date: Mar 2007
Posts: 657
Blog Entries: 1
IN10TION is on a distinguished road
:: you can't use "property" in a code, just use "color" to a normal variable name in your if statement. like... color indic.1=Lime

:: then use the color outcome in a SetIndexStyle() (look this up in you manual) but will be like...
SetIndexStyle(0,DRAW_LINE,0,0,indic.1);
:: put all of this in your init() function

:: check in your manual where & how the #property must be placed, they have different aspects to consider.
IN10TION
__________________
NEW UPDate! 04 Nov. 09 IN10TION newsReader v09.98 Lite - the best forex news reader on your chart

Last edited by IN10TION; 09-05-2008 at 11:02 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
  #1266 (permalink)  
Old 09-06-2008, 12:51 AM
Senior Member
 
Join Date: Oct 2007
Posts: 230
Dave137 is on a distinguished road
Smile

Thanks, I think I can try this.

Dave
<><<<
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
  #1267 (permalink)  
Old 09-07-2008, 09:20 PM
Badguy's Avatar
Member
 
Join Date: Jan 2006
Posts: 61
Badguy is on a distinguished road
EA with Close by time and day

Hi coders

i have try to create a EA with followin options:

Start by selected Hours and Time.

It seems as if this function is working.

The other option i like to have is:

Close all trades at selected Hour an Time.

Please see my EA-Template, that i have wrote.

Somebody can help an old man?
Attached Files
File Type: mq4 # 1 EA_Test_Template v1.1.mq4 (14.5 KB, 25 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
  #1268 (permalink)  
Old 09-08-2008, 03:12 AM
Junior Member
 
Join Date: Aug 2007
Posts: 9
mish is on a distinguished road
Locking in first initial value of OrderOpenPrice()

Does anyone know of a way to lock in the first occurrence of the value of OrderOpenPrice()?

for example double x=OrderOpenPrice(); but I never want the values to change
upon sale of the order or renewing the order

I need x to act as a reference point

any help greatly appreciated

thankyou
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
  #1269 (permalink)  
Old 09-08-2008, 05:14 AM
Senior Member
 
Join Date: Nov 2006
Posts: 308
luxinterior is on a distinguished road
You could either write the price as a comment then move it to each order until such time as you want to change it, use a global variable or write to file.

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
  #1270 (permalink)  
Old 09-08-2008, 12:39 PM
Junior Member
 
Join Date: Jan 2008
Posts: 1
g_r_a_robinson is on a distinguished road
Trying to get swing high/low code to work on patterns other than pins

Hi,

I have an EA that calls an indicator which tells me if the price is at a swing high/low. It works fine on the current bar, so for e.g if its a pinbar and its at a swing high/low then my EA creates a buy/sell entry. Its works great as long as my EA picks up pinbars. But its no good if I need to make the entry on say an inside bar at a swing high/low because the high/low bar as passed.

This code will work for the close of the first bar but I need the code to work for close of the second or third. In other words I need a way for my EA to remember that the price is at the high/low for a few bars after the high/low.

(prevtime != Time[0])
{
DeleteSellLimit();
}
prevtime = Time[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
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: 2 (1 members and 1 guests)
mylewis
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 07:29 AM.



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