log in     sign up for free
 
My percentage of winners is only about 50/50, because I cut my losers very quickly. The maximum loss I allow is 7 percent, and usually I am out of a losing stock a lot quicker. I make my money on the few stocks a year that double and triple in price.
David Ryan
 
 
Home
systems (285)
 
 
Special offer: buy MetaStock (try for free)   |   Reuters QuoteCenter Real-Time Data (get a free month)   |   EOD Data
Formula Library
 
AmiBroker
MetaTrader
MetaStock
TradeStation
Wealth-Lab
NinjaTrader
 
add your formula
System Library
 
 
Account login
Your email:
Password:
 
Log in
New to s4t? Sign up.
If you forgot your password click here.
Search the Web
 
Custom Search

5dayBreakout

Formula for: MetaTrader

mql4 indicator

 

 

Views:  2300

Added: September 22, 2008
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5
This formula has not been rated yet
 

email this link

 
 
Tags: MetaTrader, mql4 indicator
 




Code:

//+------------------------------------------------------------------+
//| 5dayBreakout.mq4 |
//| Bill Sica |
//| http://www.tetsuyama.com |
//+------------------------------------------------------------------+
#property copyright "Bill Sica"
#property link "http://www.tetsuyama.com"

#property indicator_chart_window
//---- input parameters
extern int DAYS=5;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+

int init()
{
//---- indicators

//---- indicators



//----
return(0);
}

//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
double daily_high[20];
double daily_low[20];
double yesterday_close;
double phigh,plow;
int i=1;

//---- TODO: add your code here
ArrayResize(daily_high,DAYS);
ArrayResize(daily_low,DAYS);
ArrayInitialize(daily_high,0);
ArrayInitialize(daily_low,0);

ArrayCopySeries(daily_low, MODE_LOW, Symbol(), PERIOD_D1);
ArrayCopySeries(daily_high, MODE_HIGH, Symbol(), PERIOD_D1);

/* initialise */
plow=daily_low[1];
phigh=daily_high[1];

for(i=1;i {
if(plow>daily_low[i])
{
plow =daily_low[i];
}
}

for(i=1;i {
if(phigh {
phigh =daily_high[i];
}
}

Comment("\n5dayH ",phigh,"\n5dayL ",plow);

ObjectDelete("5dayHigh");
ObjectDelete("5dayLow");

ObjectCreate("5dayHigh", OBJ_HLINE,0, CurTime(),phigh);
ObjectSet("5dayHigh",OBJPROP_COLOR,SpringGreen);
ObjectSet("5dayHigh",OBJPROP_STYLE,STYLE_SOLID);

ObjectCreate("5dayLow", OBJ_HLINE,0, CurTime(),plow);
ObjectSet("5dayLow",OBJPROP_COLOR,Red);
ObjectSet("5dayLow",OBJPROP_STYLE,STYLE_SOLID);

ObjectsRedraw();

return(0);
}
//+------------------------------------------------------------------

 





Code to difficult? Find somebody to help you with coding here.

 


Source: http://www.tetsuyama.com

 

View similar (mql4 indicator for MetaTrader):

ATR
Super-Signals
3D Oscilator
5dayBreakout
Avg Daily Range
DS_Stochastic
ATR Levels
ADX Crossing
ATR Channels
Inside or Outside Bars
...
 
 
all formulas for MetaTrader
all formulas

 

 

Email to friend

Top

 

     
However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators
and systems are submitted by anonymous users.
Therefore S4T™ does not take any responsibility for it's quality.
If you use any of this information, use it at your own risk. You are responsible for your own trading decisions.
Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade.
In no case will S4T™ be responsible for your trading gains or losses.
PayPalSecure payments by PayPal S4T™ is a part of TAURO EDUCATION NETWORK
 
Privacy note | (c) copyrights systems4trading.com 2006-2009