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
  #971 (permalink)  
Old 05-28-2008, 01:20 PM
hansen_hardrocker's Avatar
Junior Member
 
Join Date: May 2008
Posts: 16
hansen_hardrocker is on a distinguished road
Thx

Quote:
Originally Posted by matrixebiz View Post
It probably because you have Money Management enabled in the EA.
Thx bro..

im newbie..
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
  #972 (permalink)  
Old 05-29-2008, 08:33 AM
Junior Member
 
Join Date: Nov 2007
Location: Stanton, CA
Posts: 2
pabad is on a distinguished road
Can You Change This EA?

Hello programmers,

I have this EA that places stop orders above and below current price. What I need is an EA that will place limit orders instead of stop orders above and below current price. Can you change this EA to do just that while keeping all of the parameters the same?

Thanks in advance,
Paul
Attached Files
File Type: mq4 Euro Usd Grid.mq4 (27.8 KB, 24 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
  #973 (permalink)  
Old 05-29-2008, 08:42 AM
MrM MrM is offline
Member
 
Join Date: Jul 2007
Posts: 81
MrM is on a distinguished road
How to make an indicator work on another indicator?

If you drop the basic moving average (included as indicator in MT4) on another indicator, it is possible to calculate the MA of the indicator, but how do you change a custom indicator in such a way that it's possible to drop it on another indicator?
__________________
tensigma.blogspot.com
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
  #974 (permalink)  
Old 05-29-2008, 12:36 PM
Junior Member
 
Join Date: Apr 2008
Posts: 2
diffused is on a distinguished road
on bar open

Hi,

I'm wanting to run a piece of code only when a new bar is created (on bar open).

Anyone have a code snippet for something like this?


Cheers
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
  #975 (permalink)  
Old 05-30-2008, 11:04 AM
Junior Member
 
Join Date: May 2008
Posts: 11
shenxinon is on a distinguished road
Unhappy why my Indicator do not work well????

#property copyright "沈欣"
#property link "shenxinon@126.com"

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 SteelBlue
//#property indicator_minimum -0.01
//#property indicator_maximum 0.01
//---- input parameters
extern int SMA1=12;
extern int SMA2=72;
//---- buffers
double ExtMapBuffer1[];
//---- 自定义区
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
string sName="RAVI indicator";
IndicatorShortName("RAVI indicator("+SMA1+","+SMA2+")");

//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
//----
if(counted_bars<0) return(-1);// if there is a error then exit and return -1
if(counted_bars>0) counted_bars--;
int pos = Bars-counted_bars;

double sma1,sma2,r;
while(pos>=0)
{
sma1=iMA(NULL,0,SMA1,0,MODE_SMA,PRICE_CLOSE,pos);
sma2=iMA(NULL,0,SMA2,0,MODE_SMA,PRICE_CLOSE,pos);
r=((sma1-sma2)/sma2)*10000;
//Alert("r=",r);
ExtMapBuffer1[pos]=r;
pos--;
}
return(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
  #976 (permalink)  
Old 05-30-2008, 11:41 AM
Junior Member
 
Join Date: May 2008
Posts: 11
shenxinon is on a distinguished road
...

I've got it
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
  #977 (permalink)  
Old 05-30-2008, 04:08 PM
Member
 
Join Date: Oct 2006
Posts: 80
Big Be is on a distinguished road
Quote:
Originally Posted by diffused View Post
Hi,

I'm wanting to run a piece of code only when a new bar is created (on bar open).

Anyone have a code snippet for something like this?


Cheers

if (Volume[0] == 1)
{DO...}

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
  #978 (permalink)  
Old 05-31-2008, 07:26 PM
Junior Member
 
Join Date: Aug 2007
Posts: 8
Matrix 78 is on a distinguished road
trend Envelope EA

Hola
I'm teaching mql.
I read Usage of Technical Indicators - Simple Programs in MQL4 - MQL4 Tutorial, but i don't find something like
Is it possible to color a single bar?Exemple during test your EA u can color the entry bar...
On metatrader i don't see any watch system, like to see the field of my variabile array there is in all C compilator
I wanto to to do this stupid system:
When price broke and close up the trend evelope (look the pic wich yellow cirlce) i open an alert and color a breakbar.
But my problem is that this that i read only the trend up indicator and not during short period why??


Code:
double maxprec= iHigh(NULL, PERIOD_M5,1);
   double minprec=iLow(NULL, PERIOD_M5,1);
   double chiusura2 = iClose(NULL,PERIOD_M15 ,2);
   double chiusura = iClose(NULL,PERIOD_M15 ,1);
   double chiu2 = iClose(NULL,PERIOD_M5 ,2);
   double chiu = iClose(NULL,PERIOD_M5 ,1);
   double apertura = iOpen(NULL,PERIOD_M15 ,0)
string rottura [3] = {" Nulla"," ROTTO"};


envelope15_1=iCustom(NULL, PERIOD_M15, "TrendEnvelopes_v1", 5,0,1);// trend envelope

if( chiusura2 > envelope15_2 && chiusura < envelope15_2 && apertura <= envelope15_2)  
      {
      rot=1;
      Alert ( " ha rotto SH M15");
      }
     else
      rot=0; 

Comment( ""\nBreak Enveolpe M 5= ", rottura[rot2],
           "\nBrerak Enveolpe M 15= ", rottura[rot]
           ); // Alert
Attached Images
File Type: jpg eur.JPG (100.5 KB, 169 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
  #979 (permalink)  
Old 06-01-2008, 07:15 PM
Junior Member
 
Join Date: Apr 2006
Posts: 9
lizmerrill is on a distinguished road
Is This Correct Formula

is this the correct formula for calculating the value of a pip for the eur/chf cross:

(1/(eur/chf))*10*(eur/us)
a pip is .0001.

Correct formula above?
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
  #980 (permalink)  
Old 06-01-2008, 10:24 PM
Senior Member
 
Join Date: Dec 2005
Location: In front of my trading desk
Posts: 348
Devil2000 is on a distinguished road
Quote:
Originally Posted by lizmerrill View Post
is this the correct formula for calculating the value of a pip for the eur/chf cross:

(1/(eur/chf))*10*(eur/us)
a pip is .0001.

Correct formula above?
Use this code:

pipvalue=MarketInfo("EURCHF",MODE_TICKVALUE);

Hope this helps
__________________
Need a professional MQL4 programmer? PM me
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: 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

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 01:04 PM.



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