Forex



Go Back   Forex Trading > Training > Metatrader > Metatrader 4 mql 4 - Development course > Questions
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
  #1411 (permalink)  
Old 11-21-2008, 02:11 PM
kiromano's Avatar
Junior Member
 
Join Date: Feb 2008
Posts: 9
kiromano is on a distinguished road
Thanks ArshadFX

Great article Arshad..

Thanks for the reply. Looks like I have some homework to do. I will let you know how it goes...
__________________
“A loss never bothers me after I take it. I forget it overnight. But being wrong - not taking the loss - that is what does damage to the pocketbook and to the soul.”
Jesse Livermore.
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
  #1412 (permalink)  
Old 12-04-2008, 06:36 AM
increase's Avatar
Senior Member
 
Join Date: May 2006
Posts: 844
increase is on a distinguished road
Can someone help please with this

I have an EA and I want to access 2 lines from an indicator within the EA the lines in the indicator are.

expression 1
if(iMA(NULL,0,Period(),1,MODE_SMA,PRICE_HIGH,i) > zigzag1 && iMA(NULL,0,Period(),1,MODE_SMA,PRICE_HIGH,i) != 0 && iMA(NULL,0,Period(),1,MODE_SMA,PRICE_HIGH,i) != EMPTY_VALUE) ExtMapBuffer2[i]=iMA(NULL,0,Period(),1,MODE_SMA,PRICE_HIGH,i); else ExtMapBuffer2[i] = 0.0;;

expression 2
if(iMA(NULL,0,Period(),1,MODE_SMA,PRICE_LOW,i) < zigzag1 && iMA(NULL,0,Period(),1,MODE_SMA,PRICE_LOW,i) != 0 && iMA(NULL,0,Period(),1,MODE_SMA,PRICE_LOW,i) != EMPTY_VALUE) ExtMapBuffer1[i]=iMA(NULL,0,Period(),1,MODE_SMA,PRICE_LOW,i); else ExtMapBuffer1[i] = 0.0;

I want to say in the EA
when expression 1 is true Buy & close sell if open
when expression 2 is true sell & close Buy if open

How can I do this?
__________________
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
  #1413 (permalink)  
Old 12-04-2008, 07:25 AM
increase's Avatar
Senior Member
 
Join Date: May 2006
Posts: 844
increase is on a distinguished road
Quote:
Originally Posted by increase View Post
How can I do this?
Quote:
Originally Posted by increase View Post

How can I do this?
Is it something like

double Buy1_1 = iCustom(NULL, 0, "Trend", 96, Current + 0);
double Buy1_2 = 0;

double Sell1_1 = iCustom(NULL, 0, "Trend", 97, Current + 0);
double Sell1_2 = 0;

double CloseBuy1_1 = iCustom(NULL, 0, "Trend", 96, Current + 0);
double CloseBuy1_2 = 0;

double CloseSell1_1 = iCustom(NULL, 0, "Trend", 97, Current + 0);
double CloseSell1_2 = 0;
__________________
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
  #1414 (permalink)  
Old 12-04-2008, 07:35 AM
Senior Member
 
Join Date: Apr 2008
Location: Rawalpindi
Posts: 106
arshadFX is on a distinguished road
Problem in NormalizeDouble

I need 5 digit after decimal from price quote, it will display when using DoubleToStr function. I want to store a vlue get from object and use it for further calcullation i.e "price2"
could anyone please help me to solve this problem
Attached Files
File Type: mq4 ObjGet.mq4 (1.3 KB, 15 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
  #1415 (permalink)  
Old 12-10-2008, 05:47 PM
Brazenmichael's Avatar
Member
 
Join Date: Jul 2007
Location: Florida
Posts: 86
Brazenmichael is on a distinguished road
??

moved to another thread.
__________________
Wanna know how to trade? K.I.S.S.

Last edited by Brazenmichael; 12-10-2008 at 08:15 PM. Reason: move.
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
  #1416 (permalink)  
Old 12-11-2008, 01:29 AM
Member
 
Join Date: Jul 2008
Posts: 30
sfindlay is on a distinguished road
Help with my EA please

Please can you help me with my EA? It is based on the Inside Bar strategy, and, while it is very profitable in backtesting from June 08 this is a completely random phenomenon as it is not following the program whatsoever. The trade entry logic is based on this post here Between 40-100 pips per Day. But, instead, it places a new trade any old where as soon as the old one is closed and ignores the trading requirements. I'm sure my problem is really simple but my skills are not great.


I think that the problem is with these lines of code here:
if(Open[3]>Close[3] && High[2]<=High[3] && Low[2]>=Low[3] && Open[2]<Close[2] && ask-2*Point > High[2] || ask-2*Point> High[1])
{
Candle="Long";
}

if(Open[3]<Close[3] && High[2]<=High[3] && Low[2]>=Low[3] && Open[2]>Close[2] && bid+2*Point < Low[2] || bid+2*Point < Low[1])
{
Candle="Short";
}
Please can somebody help as I have invested hours trying to fix this and am running out of ideas!
Thanks in advance
Attached Files
File Type: mq4 Sue WIlliamsV2.mq4 (8.6 KB, 22 views)

Last edited by sfindlay; 12-11-2008 at 01:02 PM. Reason: clarification
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
  #1417 (permalink)  
Old 12-12-2008, 09:39 AM
increase's Avatar
Senior Member
 
Join Date: May 2006
Posts: 844
increase is on a distinguished road
Some help please with an EA


I am trying to close a sell order and open a new buy order. The buy opens but the sell gives error 4051

I am using
ticket = OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, Gold);// close position

and
ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, StopLossLevel, TakeProfitLevel, "Buy(#" + MagicNumber + ")", MagicNumber, 0, DodgerBlue);
__________________
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
  #1418 (permalink)  
Old 12-14-2008, 07:03 AM
luu luu is offline
Member
 
Join Date: Aug 2008
Posts: 30
luu is on a distinguished road
How to change magic number ?

Hi all,

I use difference EA (copy from one origin EA) to trade difference pairs in difference chart window and I'd like to change the magic number but don't know how is the magic number works ? Could you please tell me:

1. How is the magic number works ?
2. How to change the magic number ?
3. Can I take any number to change the magic number or I MUST use some number in some rules ?
4. Could you give me an example to change magic number at my EA's magic number: 16763 ?

Thank you so much for your 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
  #1419 (permalink)  
Old 12-14-2008, 08:05 AM
Senior Member
 
Join Date: Nov 2006
Posts: 308
luxinterior is on a distinguished road
Magic number is nothing more than a unique identifier. It distinguishes each instance of the same EA while also distinguishing it from any other EA that you may have running.

If the magic number is an external variable just change it to any number you want. Just be sure it's not the same number as any other EA you have running.

If it's not an external variable then look in the code for the variable and change it to any number you want.

Hope that helps.

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
  #1420 (permalink)  
Old 12-14-2008, 04:15 PM
luu luu is offline
Member
 
Join Date: Aug 2008
Posts: 30
luu is on a distinguished road
Quote:
Originally Posted by luxinterior View Post
Magic number is nothing more than a unique identifier. It distinguishes each instance of the same EA while also distinguishing it from any other EA that you may have running.

If the magic number is an external variable just change it to any number you want. Just be sure it's not the same number as any other EA you have running.

If it's not an external variable then look in the code for the variable and change it to any number you want.

Hope that helps.

Lux
Hi Lux,

You mean I can change my EA's magic number:16763 to 16764 ; 16765 ect... ?

Thank you for your quick reply.

Luu
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 07:31 AM.



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