Coding help - page 440

 
mladen:
NWFstudent Here is that type too : pet-d_full_option_-_separate.mq4

thanks alot!!

 

mladen.

Can I ask what that red bar at the right after all the candlesticks are? I can see you always have that bar/indicator on all of your chart so it has made me curios.

Thanks

 
NWFstudent:
mladen.

Can I ask what that red bar at the right after all the candlesticks are? I can see you always have that bar/indicator on all of your chart so it has made me curios.

Thanks

NWFstudent

That is daily data indicator. A couple of versions posted at this thread : https://www.mql5.com/en/forum/178698

 
mladen:
NWFstudent Here is that type too : pet-d_full_option_-_separate.mq4

This is the same as the 'MA histo nmc' with the same setting, but minus the alerts.

 
Jeeves:
This is the same as the 'MA histo nmc' with the same setting, but minus the alerts.

Jeeves

Yes. All in all, that is simply a cross of price and moving average (when the price crosses average up one color when the price crosses average down, another color). Seems that someone used velocity indicator to make that one - as I see it is even sold for some good money

 

Hey Mladen!

Could you do me a favor and write short code that would be showing arrow UP below formating bearish candle and vice versa for bullish candle? Also it should be checking it every second (or tick if possible) in case it changes from bearish to bullish so it will delete that DOWN arrow and replace it with UP arrow. It would help me a lot.

Thanks in advance!

 
neverbeast:
Hey Mladen!

Could you do me a favor and write short code that would be showing arrow UP below formating bearish candle and vice versa for bullish candle? Also it should be checking it every second (or tick if possible) in case it changes from bearish to bullish so it will delete that DOWN arrow and replace it with UP arrow. It would help me a lot.

Thanks in advance!

neverbeast

You can do it like this :

#property indicator_chart_window

#property indicator_buffers 2

#property indicator_color1 LimeGreen

#property indicator_color2 Orange

double up[];

double dn[];

//

//

//

int init()

{

SetIndexBuffer(0,up); SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,SYMBOL_ARROWUP);

SetIndexBuffer(1,dn); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,SYMBOL_ARROWDOWN);

return(0);

}

int deinit(){ return(0); }

int start()

{

int i,limit,counted_bars = IndicatorCounted();

if(counted_bars < 0) return(-1);

if(counted_bars > 0) counted_bars--;

limit = MathMin(Bars-counted_bars,Bars-1);

for(i=limit; i>=0; i--)

{

up = EMPTY_VALUE; dn = EMPTY_VALUE;

if (Close>Open) up=Low;

if (Close<Open) dn=High;

}

return(0);

}
 

That's exactly what I needed. Thanks a lot!

 
neverbeast:
That's exactly what I needed. Thanks a lot!

Happy trading

 

thank you mrtools!

however , the red line is rising bear and green is rising bull? and purple is climax bear?

I feel like it makes alert when the purple bar appears as well. and I just haven't seen what happens when climax bull happens yet but, did you make it like it makes alert when climax bar appears too? I wanted it to make alert only when there is "rising" bars.

Could you fix it?

Thank you again.

Reason: