Icustom - page 3

 
 

this one doesnt redraw

richx7:
I think SolarWind is one of the best indicator I have seen. I have been testing it and find it gives excellent buy sell exit signals. Here is a version that doesn't repaint. It uses previous data to smooth out the current bar but does add some delay. It is useful for live trading and in EAs. It works good with triggerlines and awesome indicators.
 
Perky:
this one doesnt redraw

no this one no that one no this one

all I did was chane the colour of histo for downs/ups to give faster indication of changes|

Files:
 
 

Help needed with iCustom

Hi, Solved the issues so removed the question.

Many thanks.

 

How u solved the problem. I am also facing the problem to call indicator from EA and pass buy/sell signal to EA to trigger orders, but cant, please have look and let me know, if u can fix it.

Files:
 

iCustom Needs ALL Parameters

shaival:
How u solved the problem. I am also facing the problem to call indicator from EA and pass buy/sell signal to EA to trigger orders, but cant, please have look and let me know, if u can fix it.

Hi Shaival,

I am assuming you are a novice coder and want to learn how to get iCustom values from indicators.

In that mode, I prefer to teach people to fish...so below is the basic example of how to do it yourself.

If you are not a coder, maybe someone will help you code this into your EA.

Here is the basic strategy on how to get iCustom values from an indicator.

The iCustom statements need to include ALL the "extern's" for the indicator in the iCustom formula.

For Example - MAProfit.mq4 - the Indicator to be called from MAProfitEA....

This indicator has 16 extern settings - ALL extern settings need to be included in the iCustom statements in the MAProfit EA

extern int PeriodShort=6;

extern int PeriodLong=40;

extern int Method=0;

extern bool Optimize=true;

extern bool DrawTringles=true;

extern int MinShortMA=5;

extern int MaxShortMA=50;

extern int MaxLongMA=150;

extern int StepLongMA=5;

extern int StepShortMA=5;

extern int CountOptimize=150;

extern bool OptimizeAll=false;

extern bool OptimizeSystems=true;

extern bool OptimizeOnNewCandle=false;

extern int RepaintBars=500;

extern bool Alarm=true;

in MAProfitEA - You have:

string s1=iCustom(NULL, 0, "A_MAProfit",4,0);

You need all 16 settings in the iCustom statement - Change to:

s1=iCustom(NULL, 0, "A_MAProfit", a , b , c , e , f , g , h , i , j , k , l , m , n , p, q, r, Buffer, Bar)

Replace the letters with either the name or the value (eg: Method or 0) for each setting, then add the buffer and bar to get the values from.

It should work fine like that.

A few questions:

You are assigning MA values to a string function?

Also I'm not sure which buffers you are getting or why...?

Another helpful step - I would suggest displaying your values in Comments on the screen to see them working.

Hope this helps,

Robert

 

iCustom SuperTrend

I'm trying to figure out why this line isn't giving me the current trendUp or trendDown value.

double val1=iCustom(NULL, 0, "SuperTrend",0,0,0);

double val2=iCustom(NULL, 0, "SuperTrend",0,1,0);

The values that are outputted to the log are no where close to what the actual values are.

My goal is to get the current candle's trend up or trend down value.

Files:
supertrend.jpg  284 kb
 
jchen01:
I'm trying to figure out why this line isn't giving me the current trendUp or trendDown value.

double val1=iCustom(NULL, 0, "SuperTrend",0,0,0);

double val2=iCustom(NULL, 0, "SuperTrend",0,1,0);

The values that are outputted to the log are no where close to what the actual values are.

My goal is to get the current candle's trend up or trend down value.

What are the inputs of SuperTrend indicator?

 

Ahhh that's my problem. CodeGuru, thank you lol ;-)

double up = iCustom(NULL,0,"SuperTrend",10,3,0,1)

double down = iCustom(NULL,0,"SuperTrend",10,3,1,1);

Reason: