Please fix this indicator or EA - page 48

 

...

fx47

For current (still opened) bar it is using the high and low of today . If the new high or the new low is formed, it will move the values for the current day. You can avoid that only if you use previous day values for current day calculations but then it will not be the same indicator. Attaching one that allows you to shift days so you can test it for yourself

As of the other question : I wish I knew something like that

fx47:
Hi mladen,

can you please check attached atr levels indicator. It works fine but the problem is it recalculate the levels in trending market. Is this possible to make the levels fixed? I just need the daily fixed levels. Another question (just my curiosity, it would sound silly ), is there any indicator or system that detect the direction of the whole day at the starting of the day? Thought you're the expert so I could ask you. I really appreciate your help.

Regards,

fx47
Files:
 
mladen:
fx47

For current (still opened) bar it is using the high and low of today . If the new high or the new low is formed, it will move the values for the current day. You can avoid that only if you use previous day values for current day calculations but then it will not be the same indicator. Attaching one that allows you to shift days so you can test it for yourself

As of the other question : I wish I knew something like that

WOW! that was really fast. Thank you so much. Just attached on the chart, looks it'll work. I'll let you know tomorrow how it works.

Regards.

 
mladen:
fx47

For current (still opened) bar it is using the high and low of today . If the new high or the new low is formed, it will move the values for the current day. You can avoid that only if you use previous day values for current day calculations but then it will not be the same indicator. Attaching one that allows you to shift days so you can test it for yourself

As of the other question : I wish I knew something like that

Hello mladen,

it's working fine for me. I'm using -1 (minus one) to know the current levels and amazingly it's working. But there is a little problem. The main 2 yellow (fat lines) levels is not drawing in current day cause using -1 day for setting. What I want is, to draw the previous day's lines as for current day. Just extending the previous day's 2 levels for current day. When the day finishes indicator will calculate new levels for that day and erase that 2 extended levels and extend the new previous levels for current day. Please have a look at the attached image. I hope it'll be clear.

Regards,

fx47

Files:
atr_test.jpg  79 kb
 

Hi mladen, sorry for my ignorance..where is the error?? Can you fix it?

//----

#property indicator_minimum 0

#property indicator_maximum 100

#property indicator_level1 20

#property indicator_level2 80

#property indicator_levelcolor 0xFFFFFF

#property indicator_separate_window

#property indicator_buffers 3

#property indicator_color1 Red

#property indicator_color2 Blue

#property indicator_color3 White

//----

extern int N = 14;

extern int TimeFrame=15;

extern int TimeFrame1=30;

extern int TimeFrame2=60;

double ExtMapBuffer1[];

double ExtMapBuffer2[];

double ExtMapBuffer3[];

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

//| Custom indicator initialization function |

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

int init()

{

string short_name;

SetIndexBuffer(0,ExtMapBuffer1);

SetIndexStyle(0,DRAW_LINE);

SetIndexBuffer(1,ExtMapBuffer2);

SetIndexStyle(1,DRAW_LINE);

SetIndexBuffer(2,ExtMapBuffer3);

SetIndexStyle(2,DRAW_LINE);

switch(TimeFrame)

{

case 1 : string TimeFrameStr="Period_M1"; break;

case 5 : TimeFrameStr="Period_M5"; break;

case 15 : TimeFrameStr="Period_M15"; break;

case 30 : TimeFrameStr="Period_M30"; break;

case 60 : TimeFrameStr="Period_H1"; break;

case 240 : TimeFrameStr="Period_H4"; break;

case 1440 : TimeFrameStr="Period_D1"; break;

case 10080 : TimeFrameStr="Period_W1"; break;

case 43200 : TimeFrameStr="Period_MN1"; break;

default : TimeFrameStr="Current Timeframe";

}

switch(TimeFrame1)

{

case 1 : string TimeFrameStr1="Period_M1"; break;

case 5 : TimeFrameStr1="Period_M5"; break;

case 15 : TimeFrameStr1="Period_M15"; break;

case 30 : TimeFrameStr1="Period_M30"; break;

case 60 : TimeFrameStr1="Period_H1"; break;

case 240 : TimeFrameStr1="Period_H4"; break;

case 1440 : TimeFrameStr1="Period_D1"; break;

case 10080 : TimeFrameStr1="Period_W1"; break;

case 43200 : TimeFrameStr1="Period_MN1"; break;

default : TimeFrameStr1="Current Timeframe";

}

switch(TimeFrame2)

{

case 1 : string TimeFrameStr2="Period_M1"; break;

case 5 : TimeFrameStr2="Period_M5"; break;

case 15 : TimeFrameStr2="Period_M15"; break;

case 30 : TimeFrameStr2="Period_M30"; break;

case 60 : TimeFrameStr2="Period_H1"; break;

case 240 : TimeFrameStr2="Period_H4"; break;

case 1440 : TimeFrameStr2="Period_D1"; break;

case 10080 : TimeFrameStr2="Period_W1"; break;

case 43200 : TimeFrameStr2="Period_MN1"; break;

default : TimeFrameStr2="Current Timeframe";

}

IndicatorShortName(short_name);

}

//----

return(0);

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

//| MTF Moving Average |

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

int start()

{

datetime TimeArray[],TimeArray1[],TimeArray2[];

int i,shift,limit,y=0,counted_bars=IndicatorCounted();

int a,shift1,limit1,b=0,counted_bars1=IndicatorCounted();

int c,shift2,limit2,d=0,counted_bars2=IndicatorCounted();

ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeFrame);

ArrayCopySeries(TimeArray1,MODE_TIME,Symbol(),TimeFrame1);

ArrayCopySeries(TimeArray2,MODE_TIME,Symbol(),TimeFrame2);

limit=Bars-counted_bars;

limit1=Bars-counted_bars1;

limit1=Bars-counted_bars2;

for(i=0,y=0;i<limit;i++)

for(a=0,b=0;a<limit;a++)

for(c=0,d=0;c<limit;c++)

{

if (Time<TimeArray[y]) y++;

if (Time[a]<TimeArray1) b++;

if (Time[c]<TimeArray2[d]) d++;

ExtMapBuffer1=iHigh(NULL, TimeFrame, iHighest(NULL, TimeFrame, MODE_CLOSE, N,y) ) * 100 ;

ExtMapBuffer2[a]=iHigh(NULL, TimeFrame1, iHighest(NULL, TimeFrame1, MODE_CLOSE, N,b) ) * 100 ;

ExtMapBuffer3=iHigh(NULL, TimeFrame2, iHighest(NULL, TimeFrame2, MODE_CLOSE, N,d) ) * 100 ;

}

return(0);

}

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

 

s-stochflet

as a newbiz trader , i love a visual option. extra alert, maybe. currently , i m used s-stochflet as early reminder that a trend will change soon. This indicator are really repaint. sometime really badly. But it is ok when i m using others confirmation before entry or exit.

currently , this indicator only draw in a sub window but what that i m need it is , it s can draw in a main window too.

so it will easier for me to do a trendline and breakout strategies.

s-stochflet_alert.mq4

kindly advice, thank you.

 
goldblack7:
as a newbiz trader , i love a visual option. extra alert, maybe. currently , i m used s-stochflet as early reminder that a trend will change soon. This indicator are really repaint. sometime really badly. But it is ok when i m using others confirmation before entry or exit.

currently , this indicator only draw in a sub window but what that i m need it is , it s can draw in a main window or any others subwindow too.

s-stochflet_alert.mq4

kindly advice, thank you.

hope someone will help me.

thank you

 

...

The curve that is drawn is a WPR. If you want to have a WPR on chart find the on chart stochastic (here is a link to one of the versions that can be found on TSD : onchart-stochastic.mq4 ) , set the slowing to 1 and signal to 1 and you will get the same thing as WPR (stochastic with slowing set to 1 and using high/low for prices == WPR+100, see the example bellow)

goldblack7:
hope someone will help me. thank you
Files:
sto-wpr.gif  48 kb
 

i just know that thats stochastic is wpr. i know how to treat it then and will do something with that indicator. by the way thanz mladen.

 

need help fixing code bug

hi,

i've made this ea using forex ea generator, i use it on my manual trading (it just open 1trade and stop).

it create a pending order EA, once a certain volume and price is reach, it put it at N pips away (offset) from the high/low of the previous candle (depending sell or buy). and put the stoploss at the oposite high low of the candle.

see pics for clearer explaination

the Money management almost work but it doesn't take in consideration the offset. basically if i do not put any offset it work, but if i use some it will calculate it like i didn't and so make my loss too big.

so if any programmer is wiiling to (or tell me how to) solve this issue, it would be great.

thanks

Files:
 

hi kids

An indicator wanted . Close-daily MathSqrt of old 50 days

Write the current day chart And so the days before.

Draw a line from the start date to end date.

MathSqrt(close[50])

Thanks sara

example

Files:
capture1.png  62 kb