Forex



Go Back   Forex Trading > Downloads > Indicators - Metatrader 4
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
  #2001 (permalink)  
Old 04-04-2008, 07:31 PM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
fxbs is on a distinguished road
f-la nice, but seems like they didn't wanted mess with counted bars(limit) here and let it run on all the bars
MTF_DeMarker - MQL4 Code Base
___________
p.s. should be ok now: DeMarkerB_MTF.mq4
Attached Files
File Type: mq4 DeMarkerB_MTF.mq4 (4.0 KB, 111 views)

Last edited by fxbs; 04-07-2008 at 04:03 AM.
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
  #2002 (permalink)  
Old 04-06-2008, 10:48 AM
Junior Member
 
Join Date: Jul 2006
Posts: 13
slonmd is on a distinguished road
Help!!!!

Does anybody can help me?

This indicator( MTF Candles) shows maxim at D1 timeframe, but i need also to use at W1 and MN. Please help me.

This is the code.

#property link "mankurt@freemail.ru"
#property copyright "© 2006, mankurt"
#property indicator_chart_window
//+------------------------------------------------------------------------------------------------+
extern int TimeFrame=15;
extern color UpCandle=Lime;
extern color DnCandle=Red;
extern color DojiColor=Blue;
extern int Width=1;
extern bool BGCandle=false;
//+------------------------------------------------------------------------------------------------+
int Nbar,OpenBar,timer,i,timerTF,name,MidBar;
double HighPrevBar,LowPrevBar,ClosePrevBar;
double OpenNewBar,HighNewBar,LowNewBar,CloseNewBar;
double HighCurBar,LowCurBar,CloseCurBar;
double priceNewSH,priceNewSL,pricePrevSH,pricePrevSL,pric eCurSH,priceCurSL;
string nameNewCandle,namePrevCandle;
string nameNewShadowH,nameNewShadowL,namePrevShadowH,name PrevShadowL;
string NameBar, NameHigh, NameLow;
datetime TimeOpenNewBar,TimeCloseNewBar,TimeClosePrevBar;
datetime timeNewShadow,timePrevShadow;
bool NewBar;
//+------------------------------------------------------------------------------------------------+
int init(){
IndicatorShortName("M"+TimeFrame+" на M"+Period());
Nbar=TimeFrame/Period();
timer=Period()*60;
timerTF=TimeFrame*60;
name=0;
TimeOpenNewBar=Time[Bars-1];
OpenNewBar=Open[Bars-1];
NewBar=false;
NameBar="Bar M"+TimeFrame+"-";
NameHigh="High M"+TimeFrame+"-";
NameLow="Low M"+TimeFrame+"-";
return(0);}
//+------------------------------------------------------------------------------------------------+
int deinit(){
for(int DelOBJ=1; DelOBJ<=name; DelOBJ++){
ObjectDelete(NameBar+DelOBJ);
ObjectDelete(NameHigh+DelOBJ);
ObjectDelete(NameLow+DelOBJ);}
Comment("");
return(0);}
//+------------------------------------------------------------------------------------------------+
int start(){
if(TimeFrame>1440)
{Comment("\n"," TimeFrame more than D1 is not supporting!!!");return(0);}
if(Period()>240)
{Comment("\n"," Period more than H4 is not supporting!!!");return(0);}
if(TimeFrame<=Period()||MathMod(TimeFrame,Period() )!=0)
{Comment("\n"," TimeFrame should be more or divisible by M",Period());return(0);}
i=Bars-IndicatorCounted();
while(i>0){i--;
while(i>=0) if(Time[i]==TimeOpenNewBar||BarNew(i,TimeFrame)==false)i--;
else{NewBar=true; name++; break;}
if(i<0) i=0;
if(NewBar==true){
//+-----------------------------------------Previos Bar--------------------------------------------+
OpenBar=iBarShift(0,0,TimeOpenNewBar,false);
TimeClosePrevBar=Time[i+1];
ClosePrevBar=Close[i+1];
HighPrevBar=High[Highest(0,0,MODE_HIGH,OpenBar-i,i+1)];
LowPrevBar=Low[Lowest(0,0,MODE_LOW,OpenBar-i,i+1)];
namePrevCandle=NameBar+(name-1);
MidBar=OpenBar-MathRound((OpenBar-i)/2);
timePrevShadow=Time[MidBar];
pricePrevSH=PriceShadow(OpenNewBar,ClosePrevBar,0) ;
pricePrevSL=PriceShadow(OpenNewBar,ClosePrevBar,1) ;
namePrevShadowH=NameHigh+(name-1);
namePrevShadowL=NameLow+(name-1);
//+----------------------------------Modifi Previos Bar & Shadow-----------------------------------+
if(ObjectFind(namePrevCandle)==0){
ObjectMove(namePrevCandle,1,TimeClosePrevBar,Close PrevBar);
PropBar(OpenNewBar,ClosePrevBar,namePrevCandle);
if(OpenBar==i+1) ObjectSet(namePrevCandle,OBJPROP_WIDTH, Width*3);}
if(ObjectFind(namePrevShadowH)==0){
if(pricePrevSH==HighPrevBar) ObjectDelete(namePrevShadowH);
else{ObjectMove(namePrevShadowH,0,timePrevShadow,p ricePrevSH);
ObjectMove(namePrevShadowH,1,timePrevShadow,HighPr evBar);
ColorShadow(OpenNewBar,ClosePrevBar,namePrevShadow H);
ObjectSetText(namePrevShadowH,"High="+DoubleToStr( HighPrevBar,Digits),7,"Tahoma");}}
if(ObjectFind(namePrevShadowL)==0){
if(pricePrevSL==LowPrevBar) ObjectDelete(namePrevShadowL);
else{ObjectMove(namePrevShadowL,0,timePrevShadow,p ricePrevSL);
ObjectMove(namePrevShadowL,1,timePrevShadow,LowPre vBar);
ColorShadow(OpenNewBar,ClosePrevBar,namePrevShadow L);
ObjectSetText(namePrevShadowL,"Low="+DoubleToStr(L owPrevBar,Digits),7,"Tahoma");}}
//+-------------------------------------------New Bar----------------------------------------------+
OpenNewBar=Open[i];
TimeOpenNewBar=Time[i];
HighNewBar=High[i];
LowNewBar=Low[i];
CloseNewBar=Close[i];
TimeCloseNewBar=Time[i]+timerTF-timer;
nameNewCandle=NameBar+name;
timeNewShadow=Time[i]+MathRound(Nbar/2)*timer;
priceNewSH=PriceShadow(OpenNewBar,CloseNewBar,0);
priceNewSL=PriceShadow(OpenNewBar,CloseNewBar,1);
nameNewShadowH=NameHigh+name;
nameNewShadowL=NameLow+name;
NewBar=false;}
else{
//+------------------------------------------Current Bar-------------------------------------------+
OpenBar=iBarShift(0,0,TimeOpenNewBar,false);
CloseCurBar=Close[i];
HighCurBar=High[Highest(0,0,MODE_HIGH,OpenBar+1,i)];
LowCurBar=Low[Lowest(0,0,MODE_LOW,OpenBar+1,i)];
priceCurSH=PriceShadow(OpenNewBar,CloseCurBar,0);
priceCurSL=PriceShadow(OpenNewBar,CloseCurBar,1);}
//+------------------------------Create New Object & Modifi Current--------------------------------+
if(ObjectFind(nameNewCandle)!=0){
ObjectCreate(nameNewCandle,OBJ_RECTANGLE,0,TimeOpe nNewBar,OpenNewBar,TimeCloseNewBar,CloseNewBar);
ObjectSet(nameNewCandle,OBJPROP_STYLE, STYLE_SOLID);
PropBar(OpenNewBar,CloseNewBar,nameNewCandle);}
else{
ObjectMove(nameNewCandle,1,TimeCloseNewBar,CloseCu rBar);
PropBar(OpenNewBar,CloseCurBar,nameNewCandle);}
if(ObjectFind(nameNewShadowH)!=0){
ObjectCreate(nameNewShadowH,OBJ_TREND,0,timeNewSha dow,priceNewSH,timeNewShadow,HighNewBar);
ObjectSet(nameNewShadowH,OBJPROP_STYLE, STYLE_SOLID);
ObjectSet(nameNewShadowH,OBJPROP_WIDTH, Width);
ObjectSet(nameNewShadowH,OBJPROP_RAY, false);
ColorShadow(OpenNewBar,CloseNewBar,nameNewShadowH) ;}
else{
ObjectMove(nameNewShadowH,0,timeNewShadow,priceCur SH);
ObjectMove(nameNewShadowH,1,timeNewShadow,HighCurB ar);
ColorShadow(OpenNewBar,CloseCurBar,nameNewShadowH) ;}
if(ObjectFind(nameNewShadowL)!=0){
ObjectCreate(nameNewShadowL,OBJ_TREND,0,timeNewSha dow,priceNewSL,timeNewShadow,LowNewBar);
ObjectSet(nameNewShadowL,OBJPROP_STYLE, STYLE_SOLID);
ObjectSet(nameNewShadowL,OBJPROP_WIDTH, Width);
ObjectSet(nameNewShadowL,OBJPROP_RAY, false);
ColorShadow(OpenNewBar,CloseNewBar,nameNewShadowL) ;}
else{
ObjectMove(nameNewShadowL,0,timeNewShadow,priceCur SL);
ObjectMove(nameNewShadowL,1,timeNewShadow,LowCurBa r);
ColorShadow(OpenNewBar,CloseCurBar,nameNewShadowL) ;}}
//+-------------------------------------Comment OHLC-----------------------------------------------+
Comment(Symbol(),",M",TimeFrame," O=",OpenNewBar,", H=",HighCurBar,
", L=",LowCurBar,", C=",CloseCurBar,"\n");
return(0);}
//+---------------------Main Function "New Bar or Old Bar"-----------------------------------------+
bool BarNew (int j, int tmf)
{int t0=1440*(TimeDayOfWeek(Time[j])-1)+60*TimeHour(Time[j])+TimeMinute(Time[j]),
t1=1440*(TimeDayOfWeek(Time[j+1])-1)+60*TimeHour(Time[j+1])+TimeMinute(Time[j+1]);
if(MathMod(t0,tmf)-MathMod(t1,tmf)==t0-t1)return(false);
else return(true);}
//+---------------------Function "Price Shadow"----------------------------------------------------+
double PriceShadow (double OpnB, double ClsB, int swt)
{double prH, prL;
if(OpnB<ClsB){prH=ClsB; prL=OpnB;}
if(OpnB>ClsB){prH=OpnB; prL=ClsB;}
if(OpnB==ClsB){prH=ClsB; prL=ClsB;}
switch(swt){case 0:return(prH);break;
case 1:return(prL);break;}}
//+---------------------Function "Properti Bars"---------------------------------------------------+
void PropBar (double OpPr, double ClPr, string NmOBJ)
{string Cl=" Close="+DoubleToStr(ClPr,Digits);
string Op=" Open="+DoubleToStr(OpPr,Digits);
if(OpPr==ClPr){ObjectSet(NmOBJ,OBJPROP_BACK, false);
ObjectSet(NmOBJ,OBJPROP_COLOR,DojiColor);
ObjectSetText(NmOBJ,"Doji "+Op+Cl,7,"Tahoma");}
if(OpPr<ClPr){ObjectSet(NmOBJ,OBJPROP_COLOR,UpCand le);
ObjectSet(NmOBJ,OBJPROP_BACK, BGCandle);
ObjectSetText(NmOBJ,"UpBar "+Op+Cl,7,"Tahoma");}
if (OpPr>ClPr){ObjectSet(NmOBJ,OBJPROP_COLOR,DnCandle );
ObjectSet(NmOBJ,OBJPROP_BACK, BGCandle);
ObjectSetText(NmOBJ,"DnBar "+Op+Cl,7,"Tahoma");}
ObjectSet(NmOBJ,OBJPROP_WIDTH, Width);}
//+----------------------Function "Color Shadow"---------------------------------------------------+
void ColorShadow (double OP, double CP, string NOBJ)
{if(OP==CP)ObjectSet(NOBJ,OBJPROP_COLOR,DojiColor) ;
if(OP<CP)ObjectSet(NOBJ,OBJPROP_COLOR,UpCandle);
if (OP>CP)ObjectSet(NOBJ,OBJPROP_COLOR,DnCandle);}
//+----------------------------------------------END-----------------------------------------------+
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
  #2003 (permalink)  
Old 04-06-2008, 08:48 PM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
fxbs is on a distinguished road
well, a bit different mtf price (built with histo):
Price_Bars_MTF.mq4 -very simple
Price_BarsM2_MTF.mq4 - added features
Attached Images
File Type: gif price mtf.gif (20.5 KB, 1434 views)
Attached Files
File Type: mq4 Price_Bars_MTF.mq4 (3.5 KB, 205 views)
File Type: mq4 Price_BarsM2_MTF.mq4 (4.2 KB, 205 views)

Last edited by fxbs; 04-06-2008 at 09:09 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
  #2004 (permalink)  
Old 04-06-2008, 09:59 PM
Ethan Hunt's Avatar
Senior Member
 
Join Date: Jul 2007
Location: Israel
Posts: 222
Ethan Hunt is on a distinguished road
Lightbulb

Quote:
Originally Posted by fxbs View Post
well, a bit different mtf price (built with histo):
Price_Bars_MTF.mq4 -very simple
Price_BarsM2_MTF.mq4 - added features

fxbs
, you are the man...

Thanks

Ethan Hunt
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
  #2005 (permalink)  
Old 04-06-2008, 10:10 PM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
fxbs is on a distinguished road
this been here forever- i just changed colors //(a bit ) a lot

Last edited by fxbs; 04-07-2008 at 04:07 AM.
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
  #2006 (permalink)  
Old 04-07-2008, 02:32 PM
fx_chick's Avatar
Member
 
Join Date: Mar 2008
Posts: 40
fx_chick is on a distinguished road
Quote:
Originally Posted by fxbs View Post
change, ok but it shouldn't disappear (sidebar), Joe?

Andama, again and again - all signals valid only after bar close (current TF or respectively higher TF) - until then - open bar (price) changes and accordingly indicator's value (it reflects price) -
if we have indicator from 4H on 1H chart - after 4H bar close - pricebar doesn't changes and so indicator's value - stays fixed in history - changes go on to another open bar antill it closes and so on ... (that's why they have bar clocks (countdown)

It does repaint even after the higher timeframe bar closes. If it didn't, then it would have been the holy grail. Just about all of them pay when you backtest 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
  #2007 (permalink)  
Old 04-07-2008, 02:35 PM
erdenmensch's Avatar
Senior Member
 
Join Date: Feb 2006
Posts: 375
erdenmensch is on a distinguished road
Quote:
Originally Posted by fx_chick View Post
It does repaint even after the higher timeframe bar closes. If it didn't, then it would have been the holy grail. Just about all of them pay when you backtest it.
allt MTF repaint, its not the holy grail.
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
  #2008 (permalink)  
Old 04-07-2008, 02:45 PM
Administrator
 
Join Date: Sep 2005
Posts: 20,070
Blog Entries: 241
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Some talking about painting, repainting and so on are on this page Multi Timeframe Indicators

So, MTF indicators are not repainting. MTF is unfinished painting.
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
  #2009 (permalink)  
Old 04-07-2008, 02:48 PM
Junior Member
 
Join Date: Aug 2007
Posts: 2
mw4121 is on a distinguished road
Smile

can you advise what setting to use so indicator wont repaint after bar close on 30 minute chart. I put m30 in indicator but sometimes it repaints.
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
  #2010 (permalink)  
Old 04-07-2008, 03:39 PM
Administrator
 
Join Date: Sep 2005
Posts: 20,070
Blog Entries: 241
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
You can use CustomCandle indicator to understand wgen MTF indicator will finish painting http://www.forex-tsd.com/49841-post16.html
And CandleTime indicator as well Candles (how many minutes to the bar close - it is on the chart).

Elite members can use:
- bar on the chart counter by Kalenzo;
- alarm on every candle close.

But I think free indicators (CustomCandle and CandleTime) are more than enough. Personally I am using free CustomCandle indicator.
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
#MTF_WPR.mq4, ABSOLUTE STRENGTH, absolute strength indicator, AbsoluteStrength, AbsoluteStrength_v1.1_mtf, ADX MTF, AlaskanPipAssassin, atr channel, BBMACD, bbsqueeze, bh-ergodic, center of gravity, Coeffoline, custom candle, customcandle, Damiani_volatmeter v3.2, Envelopes, FanSimple4en, fncd indicator, forex, forextrend_v2, fxst3cci, FxTrend v2, fxtsd, histogram, indicators, megatrend, MegaTrend.mq4, mladen, mtf absolute strength, mtf adx, mtf adx indicator, mtf bband, MTF candle, mtf ema, MTF indicator, mtf LaGuerre, mtf ma, mtf macd, mtf megatrend, mtf parabolic, MTF PSAR, mtf qqe, MTF RSI, mtf rsx, mtf stochastic, MTF trendenvelopes, mtf_4tf_has_bar2m, mtf_megatrend_barm_4tfnext, multi, multi time frame, MULTI TIME FRAME indicator, multi time frame stochastic, multi timeframe, multi timeframe indicator, nonlagma v7, NonLagMA_v7.1, NRTR_Rosh_v2eAlert_mtf.ex4, open interest, pipnailer, PowerTrend, powertrend.mq4, qqe mtf, search, TheBuyZoneForex.pdf, timeframe, TrendEnvelopes_v5, trendline, TRO MultiPair, tro sak multipair, voltychoppy, XO_A_H


Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 

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
get current timeframe () or the like.. arm73c05 Metatrader 4 3 02-21-2007 08:51 PM
Timeframe / Shift divergence_trader Metatrader 4 2 02-12-2007 02:04 PM
Multi EAs, multi brokers, same computer hhsmoney General Discussion 6 11-16-2006 09:32 PM
Get current timeframe The_N Metatrader 4 2 09-08-2006 12:40 PM
Multi timeframe through a shift calculation? wananohoshi Indicators - Metatrader 4 2 08-06-2006 11:02 AM


All times are GMT. The time now is 06:06 AM.



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