Forex
Google
New signals service!

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack (2) Thread Tools Display Modes
  #1011 (permalink)  
Old 03-12-2008, 01: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!
Reply With Quote
  #1012 (permalink)  
Old 03-12-2008, 02: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!
Reply With Quote
  #1013 (permalink)  
Old 03-16-2008, 06: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!
Reply With Quote
  #1014 (permalink)  
Old 03-16-2008, 07:52 AM
Senior Member
 
Join Date: Sep 2007
Location: Poland
Posts: 232
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, 189 views)
Attached Files
File Type: mq4 ZUP_v1.mq4 (43.3 KB, 27 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1015 (permalink)  
Old 03-16-2008, 10:31 AM
yyc196's Avatar
Senior Member
 
Join Date: Dec 2006
Location: Earth
Posts: 197
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 11:26 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1016 (permalink)  
Old 03-23-2008, 03:16 AM
yyc196's Avatar
Senior Member
 
Join Date: Dec 2006
Location: Earth
Posts: 197
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!
Reply With Quote
  #1017 (permalink)  
Old 03-28-2008, 01:24 PM
Member
 
Join Date: Dec 2005
Posts: 55
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1018 (permalink)  
Old 03-28-2008, 11:35 PM
Linuxser's Avatar
Moderator
 
Join Date: May 2006
Location: Helliconia (Spring)
Posts: 2,826
Blog Entries: 34
Linuxser has disabled reputation
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.
__________________
Elite Manual Trading | Portfolio | Calendar | Suggestions to improve the forum | My Blog

Remember: Signatures must have three lines as maximum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1019 (permalink)  
Old 03-29-2008, 05: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!
Reply With Quote
  #1020 (permalink)  
Old 03-31-2008, 07: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!
Reply With Quote
Reply

Bookmarks

Tags
histogram, forex

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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/questions/270-ask.html
Posted By For Type Date
OzFx System:) - Page 639 This thread Refback 06-21-2008 09:53 PM
Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart This thread Refback 12-08-2007 11:46 AM


All times are GMT. The time now is 02:24 PM.



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