Coding help - page 433

 
mladen:
TFI

For SuperTrend nrp mtf 2.01 nmc the simplest way is to use CCI. When CCI CCIperiod is > 0, trend is up, when it is < 0, trend is down (see the picture for comparison)

Hi Mladen,

thank you very much for your idea about simplification with CCI (60). I really like it. I have the feeling it might be worth while to filter the super trend with it, as CCI seems to be a bit lagging compared to super trend.

Maybe I should address the super trend like this (in "pseudo" code, not tested yet)

if(openedOrders<=0)

{

RefreshRates();

int BarShift = 1;

double trend_up=iCustom(Symbol(),0,"SuperTrend nrp mtf 2.01 nmc",TimeFrame,CCIperiod,ATRperiod,applied_price,1,1, BarShift); //buffer 1, signal up

double trend_up_1=iCustom(Symbol(),0,"SuperTrend nrp mtf 2.01 nmc",TimeFrame,CCIperiod,ATRperiod,applied_price,1,1, BarShift+1); //buffer 1, signal up

double trend_down=iCustom(Symbol(),0,"SuperTrend nrp mtf 2.01 nmc",TimeFrame,CCIperiod,ATRperiod,applied_price,3,2,BarShift); //buffer 3, signal down

double trend_down_1=iCustom(Symbol(),0,"SuperTrend nrp mtf 2.01 nmc",TimeFrame,CCIperiod,ATRperiod,applied_price,3,2,BarShift); //buffer 3, signal down

if (trend_up >0 && trend_up!=EMPTY_VALUE && !(trend_up_1>0 && trend_up_1!=EMPTY_VALUE)

{

BUY();

}

if (trend_down > 0 && trend_down !=EMPTY_VALUE && !(trend_down_1>0 && trend_down_1!=EMPTY_VALUE)

{

SELL();

}

Thank you in advance!

With kind regards,

TFI

 
tfi_markets:
Hi Mladen,

thank you very much for your idea about simplification with CCI (60). I really like it. I have the feeling it might be worth while to filter the super trend with it, as CCI seems to be a bit lagging compared to super trend.

Maybe I should address the super trend like this (in "pseudo" code, not tested yet)

if(openedOrders<=0)

{

RefreshRates();

int BarShift = 1;

double trend_up=iCustom(Symbol(),0,"SuperTrend nrp mtf 2.01 nmc",TimeFrame,CCIperiod,ATRperiod,applied_price,1,1, BarShift); //buffer 1, signal up

double trend_up_1=iCustom(Symbol(),0,"SuperTrend nrp mtf 2.01 nmc",TimeFrame,CCIperiod,ATRperiod,applied_price,1,1, BarShift+1); //buffer 1, signal up

double trend_down=iCustom(Symbol(),0,"SuperTrend nrp mtf 2.01 nmc",TimeFrame,CCIperiod,ATRperiod,applied_price,3,2,BarShift); //buffer 3, signal down

double trend_down_1=iCustom(Symbol(),0,"SuperTrend nrp mtf 2.01 nmc",TimeFrame,CCIperiod,ATRperiod,applied_price,3,2,BarShift); //buffer 3, signal down

if (trend_up >0 && trend_up!=EMPTY_VALUE && !(trend_up_1>0 && trend_up_1!=EMPTY_VALUE)

{

BUY();

}

if (trend_down > 0 && trend_down !=EMPTY_VALUE && !(trend_down_1>0 && trend_down_1!=EMPTY_VALUE)

{

SELL();

}

Thank you in advance!

With kind regards,

TFI

They are the same (it seems that super trend is faster due to the way how multi color line is drawn in metatrader. See these lines of that indicator :

if (cciTrend > 0) { Trend = MathMax(Low - iATR(NULL, 0, ATRperiod, i),Trend); Direction = 1; } if (cciTrend < 0) { Trend = MathMin(High + iATR(NULL, 0, ATRperiod, i),Trend); Direction = -1; }

As you can see it depends exclusively on "cciTrend" (which is the value of cci)

 

Hello Mstr Mladen ... İ have an Ea that needs Trading Houre's ... can you add this pls?...

İts more better when u have an script that we can use the trading sessions houre's.

Thanks in advance

Files:
cc_ea.mq4  9 kb
 
AchiJameson:
Hello Mstr Mladen ... İ have an Ea that needs Trading Houre's ... can you add this pls?...

İts more better when u have an script that we can use the trading sessions houre's.

Thanks in advance

If you are using just that ea, you can use this : https://www.forex-tsd.com/forum/debates-discussions/116-something-interesting-please-post-here/page391#comment_748167 to limit working hours for it without changing anything in the EA

 
mladen:
If you are using just that ea, you can use this : https://www.forex-tsd.com/forum/debates-discussions/116-something-interesting-please-post-here/page391#comment_748167 to limit working hours for it without changing anything in the EA

Thank you very much i give it a Try.

Lovely Greetz

 

Уважаемый Mladen & mrTools ! Можно сделать в этом индикаторе,чтобы ценовые метки можно было отключать,или вообще их убрать,сейчас они отключаются вместе с трендовыми линиями,а вот их как раз нужно оставить,и нумерацию волн сделать отключаемыми...????

Files:
 

Hi respected members,

I need help to solve this: https://www.mql5.com/en/forum/general

I need your input please.

regards

 
hanic:
Hi respected members,

I need help to solve this: https://www.mql5.com/en/forum/general

I need your input please.

regards

Check here : https://www.mql5.com/en/forum/173163

 

Hi Mr. Tools,

I'm using ths OBV indicator you made. It is very good. I need it with a histogram like the bottom indicator in this picture. I trade more the zero line cross and it would be less difficult to see with a histogram version. If it can't have the signal MA and histogram, I don't need a signal MA. But if it can have both that would be super!

Can you please help me with this?

Thank you,

Jeff

 
JeffH:
Hi Mr. Tools,

I'm using ths OBV indicator you made. It is very good. I need it with a histogram like the bottom indicator in this picture. I trade more the zero line cross and it would be less difficult to see with a histogram version. If it can't have the signal MA and histogram, I don't need a signal MA. But if it can have both that would be super!

Can you please help me with this?

Thank you,

Jeff

Hi Jeff, the on balance volume doesn't use a zero line, so zero lines crosses are not possible.

Reason: