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
  #1 (permalink)  
Old 03-25-2007, 01:10 PM
Morning Star's Avatar
Member
 
Join Date: Dec 2005
Posts: 11
Morning Star is on a distinguished road
need help

hi
is ther any codders can help me?
i wanna chang in wiseman ind(1&2) from colored the candle of signal
bar to:
draw a section on chart that begin from signal bar (high and low) and
continued until the signal is valid or new wiseman signal apear on
same directionand then draw the new section .
thx
================================================== =====
#include <stdlib.mqh>
//+------------------------------------------------------------------+
//| Wiseman 1.mq4 |
//|
//| |
//|
//+------------------------------------------------------------------+

#property copyright " David Thomas, Basileus@Moneytec"
#property link ""

#property indicator_chart_window
#property indicator_color1 LimeGreen
#property indicator_buffers 2
#property indicator_color2 Red

//+------------------------------------------------------------------+
//| Common External variables |
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//| External variables |
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//| Special Convertion Functions |
//+------------------------------------------------------------------+

int LastTradeTime;
double ExtHistoBuffer[];
double ExtHistoBuffer2[];


void SetLoopCount(int loops)
{
}

void SetIndexValue(int shift, double value)
{
ExtHistoBuffer[shift] = value;
}

void SetIndexValue2(int shift, double value)
{
ExtHistoBuffer2[shift] = value;
}


//+------------------------------------------------------------------+
//| End |
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//| Initialization |
//+------------------------------------------------------------------+

int init()
{
SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID);
SetIndexBuffer(0, ExtHistoBuffer);
SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID);
SetIndexBuffer(1, ExtHistoBuffer2);
return(0);
}
int start()
{
//+------------------------------------------------------------------+
//| Local variables |
//+------------------------------------------------------------------+
int shift = 0;
double prevbars = 0;
bool first = True;
double lips = 0;
double teeth = 0;
double loopbegin = 0;
double median = 0;
double jaws = 0;
double result = 0;

/*[[
Name := Wiseman 1
Author := David Thomas, Basileus@Moneytec
Notes := Bill Williams Wiseman 1 Divergent bars. ver. 3.
Notes := the changes of Basileus@Moneytec have been corrected and simplified.
Separate Window := No
First Color := LimeGreen
First Draw Type := Histogram
First Symbol := 217
Use Second Data := Yes
Second Color := Red
Second Draw Type := Histogram
Second Symbol := 218
]]*/

SetLoopCount(0);
// check conditions are ok.
if( Bars < 3 || Bars == prevbars ) return(0);
// check for additional bars loading or total reloading
if( Bars < prevbars || Bars-prevbars>1 ) first = True;
prevbars = Bars;

if( first ) {
// loopbegin prevent counting of counted bars exclude current
loopbegin = Bars-2;
first = False;
}
// loop from first bar to current bar (with shift=0)
for(shift=Bars-5;shift>=0 ;shift--){
result = 0;
median = (High[shift]+Low[shift])/2;
lips = iAlligator(NULL, 0, 13, 8, 8, 5, 5, 3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORLIPS, shift);
teeth = iAlligator(NULL, 0, 13, 8, 8, 5, 5, 3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORTEETH, shift);
jaws = iAlligator(NULL, 0, 13, 8, 8, 5, 5, 3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORJAW, shift);

// test for bullish divergent bar:
if( ((Close[shift] >= median) // close is in lower half of bar
&& (High[shift] < MathMin(MathMin(lips,teeth),jaws)) // bar is completely below alligator
&& (Low[shift] < Low[shift+1]) && (Low[shift] < Low[shift+2]) // low is moving down
&& (Low[shift] < Low[shift+3]) && (Low[shift] < Low[shift+4]) // ...
&& (iAO(NULL, 0, shift) < iAO(NULL, 0, shift+1)) // checking if it's right AO signal
) ) result = 1;

// test for bearish divergent bar:
if( ((Close[shift] <= median) // close is upper half of bar
&& (Low[shift] > MathMax(MathMax(lips,teeth),jaws)) // bar is completely above alligator
&& (High[shift] > High[shift+1]) && (High[shift] > High[shift+2]) // high is moving up
&& (High[shift] > High[shift+3]) && (High[shift] > High[shift+4]) // ...
&& (iAO(NULL, 0, shift) > iAO(NULL, 0, shift+1)) // checking if it's right AO signal
) ) result = -1;

if( result < 0 )
{
// red bar.
SetIndexValue(shift, Low[shift]);
SetIndexValue2(shift, High[shift]);
}
if( result > 0 )
{
// green bar.
SetIndexValue(shift, High[shift]);
SetIndexValue2(shift, Low[shift]);
}
}

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
Reply

Bookmarks


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 10:55 PM.



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