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
  #1011 (permalink)  
Old 03-12-2008, 03:52 AM
fxfariz36's Avatar
Senior Member
 
Join Date: Aug 2007
Location: at trading room
Posts: 156
fxfariz36 is on a distinguished road
please help me

please help me...

i need some one to develop for me one indicator that showing arrow
for dinapoli target..if done can u post the indicator on this thread

fxfariz36's Trading Journal and Strategy

big thank you for kind person doing this indicator...
__________________
Technical Trader
please teach me how to trade like you

[center]
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
  #1012 (permalink)  
Old 03-12-2008, 04:38 AM
Junior Member
 
Join Date: Jan 2008
Location: Canada
Posts: 9
timebandit is on a distinguished road
Checking what currencies have open orders

Hi,
I've been trying to make an EA that will test to see what currency pairs have active trades and if there are none, to open a hedge. Here's the code I'm trying. I realize each time it only selects the first trade and returns only that particular currency. So how do I get it to return all currency pairs that have open orders?
Code:
OrderSelect(trade,SELECT_BY_POS,MODE_TRADES);
  
      {
       int trade;
       int trades=OrdersTotal();
       for(trade=0;trade<trades;trade++)
         {
         
         if (OrderSymbol()=="EURUSDm")
               {
               Symbol_0=true;
               }

         if (OrderSymbol()=="GBPUSDm")
               {
               Symbol_1=true;
               }
          }
      }
         if (Symbol_0==true)
            {
            RefreshRates();
                  int ticket_buyEUR;
                  ticket_buyEUR=OrderSend("EURUSDm",OP_BUY,Lots,MarketInfo("EURUSDm",MODE_ASK),3,0,0,"",1234567,0);
                  int ticket_sellEUR;
                  ticket_sellEUR=OrderSend("EURUSDm",OP_SELL,Lots,MarketInfo("EURUSDm",MODE_BID),3,0,0,"",1234567,0);
            }
            
         if (Symbol_1==true)
            {
            RefreshRates();
                  int ticket_buyGBP;
                  ticket_buyGBP=OrderSend("GBPUSDm",OP_BUY,Lots,MarketInfo("GBPUSDm",MODE_ASK),3,0,0,"",1234567,0);
                  int ticket_sellGBP;
                  ticket_sellGBP=OrderSend("GBPUSDm",OP_SELL,Lots,MarketInfo("GBPUSDm",MODE_BID),3,0,0,"",1234567,0);
            }
Thanks
Bob
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
  #1013 (permalink)  
Old 03-16-2008, 08:04 AM
fxfariz36's Avatar
Senior Member
 
Join Date: Aug 2007
Location: at trading room
Posts: 156
fxfariz36 is on a distinguished road
Unhappy help me please

Quote:
Originally Posted by fxfariz36 View Post
please help me...

i need some one to develop for me one indicator that showing arrow
for dinapoli target..if done can u post the indicator on this thread

fxfariz36's Trading Journal and Strategy

big thank you for kind person doing this indicator...

huhuhuhu
no one help me to develop this indicator....
i very hope n hope...
masta2 in this forum can develop this indicator..


thankz in advance
__________________
Technical Trader
please teach me how to trade like you

[center]
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
  #1014 (permalink)  
Old 03-16-2008, 09:52 AM
Senior Member
 
Join Date: Sep 2007
Location: Poland
Posts: 272
Pucio is on a distinguished road
ZUP_v1 Qestion

Hi CodersGuru,

Please if you can help me to find the answer. This is first ZUP indicator. When I change in the code:

#property indicator_chart_window to #property indicator_separate_window

only the Zigzag goes to separate window. So the question is why only the Zigzag? What can I do to move retracements as well ? Is it possible at all?

Pucio
Attached Images
File Type: gif geometria.gif (26.2 KB, 255 views)
Attached Files
File Type: mq4 ZUP_v1.mq4 (43.3 KB, 59 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
  #1015 (permalink)  
Old 03-16-2008, 12:31 PM
yyc196's Avatar
Senior Member
 
Join Date: Dec 2006
Location: Earth
Posts: 198
yyc196 is on a distinguished road
How to change the SL

Hi All,

I am currently writing an EA, I learned from this Forum that "OrderSend" command is for opening an order to trade. For example:

OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, StopLossLevel, TakeProfitLevel, "Buy(#" + MagicNumber + ")", MagicNumber, 0, DodgerBlue);


What can I do if I have 2 lots. My first 1st lot is 10 pips and the 2nd lots is 20pips. After the 1st profit I would like to shift the SL of my 2nd lot further by another 10 pips (so as to protect my position of the 2nd lot)!

Shall I use the "OrderModify" command to amend the current trade order. If yes, how will be the code like? Can show me?

I hope my description is clear and may someone just code a few line so that I may proceed with the EA program.

I would appreciate and thankful for any comments given.

Thanks again.

Shek

Last edited by yyc196; 03-16-2008 at 01:26 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
  #1016 (permalink)  
Old 03-23-2008, 05:16 AM
yyc196's Avatar
Senior Member
 
Join Date: Dec 2006
Location: Earth
Posts: 198
yyc196 is on a distinguished road
I have the answer and solution for the questions I asked above, thanks. Actually, it is somewhere in the forum, very easy to access the info.

Regards

Shek
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
  #1017 (permalink)  
Old 03-28-2008, 03:24 PM
Member
 
Join Date: Dec 2005
Posts: 58
JJLL is on a distinguished road
I've got a quick question. My broker, IBFX, recently sent this to me...

"If you compiled an Expert Advisor or a Script in build 213, MetaTrader has informed us that you will have to recompile it once you update to Build 214/215.
To recompile go to:
Tools
MetaQuotes Language Editor (F4)
Double left click your Expert Advisor or Script in the Navigator
Left click on the Compile button
Exit MetaQuotes Language Editor"

My question is, what does recompiling do to an EA/script?

Thanks
__________________
http://www.EAprogrammers.com/ - A free resource devoted to connecting successful forex traders with professional programmers.
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
  #1018 (permalink)  
Old 03-29-2008, 01:35 AM
Linuxser's Avatar
User Root
 
Join Date: May 2006
Location: Helliconia (Winter)
Posts: 4,410
Blog Entries: 56
Linuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond reputeLinuxser has a reputation beyond repute
Quote:
Originally Posted by JJLL View Post
I've got a quick question. My broker, IBFX, recently sent this to me...

"If you compiled an Expert Advisor or a Script in build 213, MetaTrader has informed us that you will have to recompile it once you update to Build 214/215.
To recompile go to:
Tools
MetaQuotes Language Editor (F4)
Double left click your Expert Advisor or Script in the Navigator
Left click on the Compile button
Exit MetaQuotes Language Editor"

My question is, what does recompiling do to an EA/script?

Thanks
It generates a new ex4 code.
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
  #1019 (permalink)  
Old 03-29-2008, 07:55 AM
Junior Member
 
Join Date: Mar 2008
Posts: 1
mat_det is on a distinguished road
Filter/No plot bar if in range (time)

Anyone have formula to prevent/filter meta trader from plot bar at specific time/range
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
  #1020 (permalink)  
Old 03-31-2008, 08:42 PM
Junior Member
 
Join Date: Feb 2008
Posts: 7
ableze_joepardy is on a distinguished road
Any one can come here and help me?

hi.. I've modified the default script (trade.mq4) in metatrader platform to execute martingle based trade.. the condition is like below:

Starting lot: 0.1
Multiple: 2
Pips: 8
TP: 10
Max trade: 5

and here's the code..

Code:
//+------------------------------------------------------------------+
//|                                                    buy 1 lot.mq4 |
//|                      Copyright © 2004, MetaQuotes Software Corp. |
//|                                       http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2004, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net/"

#include <stdlib.mqh>
#include <WinUser32.mqh>
//+------------------------------------------------------------------+
//| script "trading for all money"                                   |
//+------------------------------------------------------------------+
int start()
  {
//----
   if(MessageBox("Do you really want to execute Martingle "+Symbol()+" at ASK price?    ",
                 "Script",MB_YESNO|MB_ICONQUESTION)!=IDYES) return(1);
//----
   int ticket1=OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Ask-40*Point,Ask+10*Point,"GU M5",770,0,CLR_NONE);
   int ticket2=OrderSend(Symbol(),OP_BUYLIMIT,0.2,Ask-8*Point,3,Ask-40*Point,Ask+2*Point,"GU M5",770,0,CLR_NONE);
   int ticket3=OrderSend(Symbol(),OP_BUYLIMIT,0.4,Ask-16*Point,3,Ask-40*Point,Ask-6*Point,"GU M5",770,0,CLR_NONE);
   int ticket4=OrderSend(Symbol(),OP_BUYLIMIT,0.8,Ask-24*Point,3,Ask-40*Point,Ask-14*Point,"GU M5",770,0,CLR_NONE);
   int ticket5=OrderSend(Symbol(),OP_BUYLIMIT,1.6,Ask-32*Point,3,Ask-40*Point,Ask-22*Point,"GU M5",770,0,CLR_NONE);
   if(ticket1<1)
     {
      int error1=GetLastError();
      Print("Error = ",ErrorDescription(error1));
      return;
     }
   if(ticket2<1)
     {
      int error2=GetLastError();
      Print("Error = ",ErrorDescription(error2));
      return;
     }
   if(ticket3<1)
     {
      int error3=GetLastError();
      Print("Error = ",ErrorDescription(error3));
      return;
     }
   if(ticket4<1)
     {
      int error4=GetLastError();
      Print("Error = ",ErrorDescription(error4));
      return;
     }
   if(ticket5<1)
     {
      int error5=GetLastError();
      Print("Error = ",ErrorDescription(error5));
      return;
     }        
//----
   OrderPrint();
   return(0);
  }
//+------------------------------------------------------------------+
but the code didnt execute the order.. whats wrong with the code?
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 05:01 PM.



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