Coding help - page 432

 
NWFstudent:
Hi.

I dont know if it is already an indicator like this. But is it possible to make one indicator that prints arrows to the chart for multiple ocilliators?

Ex: Stochastics crosses signal line from either overbought or oversold (not if the cross is in middle of nowhere) another color arrow if Signal line cross MACD and an arrow when RSI enter AND exit either oversold or overbought.

The arrows should have different color to graphicly se which is which.

For extra if your a good coder with a little speartime a little table in the right lower corner with actual values for either.

Thanks

Hi NWFstudent,

Yes you can add multiple indicators into one... Most use a "dashboard" matrix to display the different values...like you are suggesting for the "right lower corner" (or placed in any corner)...

If you are wanting multiple indicator arrows directly on the chart price line instead (and not just a dashboard showing all the values)...a good coder should be able to do those arrows for you.

Do a search for Forex Dashboard Indicators and you can see what's possible.

Hope this helps you,

Robert

 

Newdigital : Please put this in the correct place. I'm seeking a 2 sma crossover scanner/screener. Looked every where & found a number for stocks but no really good ones for forex. Many thanks

 
Jeeves:
Newdigital : Please put this in the correct place. I'm seeking a 2 sma crossover scanner/screener. Looked every where & found a number for stocks but no really good ones for forex. Many thanks

If it works for stocks and it does not work for forex, try using other settings. Whatever scanner/screener you use the math used to calculate the sma will stay the same, so the result are going to be similar to what you already use - that is probably due to the fact that forex is different type of market from stocks. Try using lwma for example, for forex instead of sma

 

Many thanks mladen....I'm useless at 'fiddling' with coding. I'll just have to keep looking & hope I find.....! Take care

 

EA based on SuperTrend nrp mtf 2.01 nmc

Hi MQL pro-coders,

I wonder if someone could help me. I would like to implement the "SuperTrend nrp mtf 2.01 nmc" indicator into my EA. What would be the best way for me to implement the super trend indicator?

The indicator has six buffers:

IndicatorBuffers(6);

SetIndexBuffer(0, Trend);

SetIndexStyle(0, DRAW_LINE,STYLE_SOLID);

SetIndexBuffer(1, TrendUpA);

SetIndexStyle(1, DRAW_LINE,STYLE_SOLID);

SetIndexBuffer(2, TrendUpB);

SetIndexStyle(2, DRAW_LINE,STYLE_SOLID);

SetIndexBuffer(3, TrendDoA);

SetIndexStyle(3, DRAW_LINE,STYLE_SOLID);

SetIndexBuffer(4, TrendDoB);

SetIndexStyle(4, DRAW_LINE,STYLE_SOLID);

SetIndexBuffer(5, Direction);

[/CODE]

I wrote the code below:

[CODE]

if(openedOrders<=0)

{

RefreshRates();

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

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

int clongs = 0;

int cshorts = 0;

for(i=OrdersTotal()-1;i>=0; i--)

{

if(OrderType()==OP_BUY) clongs++; // Check Long Traded Positions.

if(OrderType()==OP_SELL) cshorts++; // Check Short Traded Positions.

}

if(trend_up!=trend_down)

{

if(clongs<maxlongtrades && trend_up==1 && ADX_filter()==true) OpenBuy(); //BUY

if(cshorts<maxshorttrades && trend_up==-1 && ADX_filter()==true) OpenSell(); //SELL

}

}

The code compiles without warnings or errors, but it is not opening trades.

Could someone please review?

Thank you in advance!

With kind regards,

TFI

 
tfi_markets:
EA based on SuperTrend nrp mtf 2.01 nmc

Hi MQL pro-coders,

I wonder if someone could help me. I would like to implement the "SuperTrend nrp mtf 2.01 nmc" indicator into my EA. What would be the best way for me to implement the super trend indicator?

The indicator has six buffers:

IndicatorBuffers(6);

SetIndexBuffer(0, Trend);

SetIndexStyle(0, DRAW_LINE,STYLE_SOLID);

SetIndexBuffer(1, TrendUpA);

SetIndexStyle(1, DRAW_LINE,STYLE_SOLID);

SetIndexBuffer(2, TrendUpB);

SetIndexStyle(2, DRAW_LINE,STYLE_SOLID);

SetIndexBuffer(3, TrendDoA);

SetIndexStyle(3, DRAW_LINE,STYLE_SOLID);

SetIndexBuffer(4, TrendDoB);

SetIndexStyle(4, DRAW_LINE,STYLE_SOLID);

SetIndexBuffer(5, Direction);

[/CODE]

I wrote the code below:

[CODE]

if(openedOrders<=0)

{

RefreshRates();

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

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

int clongs = 0;

int cshorts = 0;

for(i=OrdersTotal()-1;i>=0; i--)

{

if(OrderType()==OP_BUY) clongs++; // Check Long Traded Positions.

if(OrderType()==OP_SELL) cshorts++; // Check Short Traded Positions.

}

if(trend_up!=trend_down)

{

if(clongs<maxlongtrades && trend_up==1 && ADX_filter()==true) OpenBuy(); //BUY

if(cshorts<maxshorttrades && trend_up==-1 && ADX_filter()==true) OpenSell(); //SELL

}

}

The code compiles without warnings or errors, but it is not opening trades.

Could someone please review?

Thank you in advance!

With kind regards,

TFI

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)

Files:
st.gif  78 kb
 
Jeeves:
Many thanks mladen....I'm useless at 'fiddling' with coding. I'll just have to keep looking & hope I find.....! Take care

Jeeves

If the indicator has a ma type that you can change in parameters, try changing it to 3 (LWMA) and see how it will work for forex

 

this indicator not open in my mt4

any one can help me to coding this indicator ?

Files:
 
thesanny:
this indicator not open in my mt4 any one can help me to coding this indicator ?

thesanny

Try it out now : cc_at_s_v2-1_-2_mtf_nmc.mq4

 

thank u very much

Reason: