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

//+------------------------------------------------------------------+

//| 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 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);

}

==================================================

Reason: