Indicator that reads 2 other indicators (.ex4) and draws alert.

 

Hi,

I`m trying to figure out, what i need to do, to make indie that reads values of 2 other indicators, but i can`t seem to get it wright, i`m not the best coder, could anyone kindly tell me whats my error here or perhaps guide me to some solution ?

 

The idea is that:

Value for first indie should be 45+, and for second indie 67+ , when these level are reached, then arrow/dot etc , should be drawn on current candle.

I have tried to code and iCustom EA, but i have been unsuccessful, or probably have done something wrong. 

 

Here is an example of what i tried to do in code.

 

double downarrow = iCustom (NULL, 0, "Custom_Indicator" 2 Current + 0,
double downarrow2 = iCustom (NULL, 0, "Rsi TMA centered bands Alert", 0, Current + 0,

// RULES HERE FOR bearish SIGNAL OR PUT
if (downarrow> 45
&& downarrow <9999999
downarrow2> 67
&& downarrow2 <9999999) {
Down [i] = High [i] + 5 * Point;
if (Open [i]> Close [i-1]) {
WinBuffer [i-1] = High [i-1] + 5 * Point,
Print ( "Win at" + TimeToStr (Time [i]));
total ++
wins ++;
} else if ( Open [i] == close [i-1]) {
print ( "Tie at" + TimeToStr (Time [i]));
LossBuffer [i-1] = High [i-1] + 5 * Point,
ties ++;
total ++;
} else {
losses ++;
LossBuffer [i-1] = High [i-1] + 5 * Point,
Print ( "Loss at" + TimeToStr (Time [i]));

total ++; 

I would appreciate any advice, thank you. 

 
odaiz:

Hi,

I`m trying to figure out, what i need to do, to make indie that reads values of 2 other indicators, but i can`t seem to get it wright, i`m not the best coder, could anyone kindly tell me whats my error here or perhaps guide me to some solution ?

 

The idea is that:

Value for first indie should be 45+, and for second indie 67+ , when these level are reached, then arrow/dot etc , should be drawn on current candle.

I have tried to code and iCustom EA, but i have been unsuccessful, or probably have done something wrong. 

 

Here is an example of what i tried to do in code.

 

double downarrow = iCustom (NULL, 0, "Custom_Indicator" 2 Current + 0,
double downarrow2 = iCustom (NULL, 0, "Rsi TMA centered bands Alert", 0, Current + 0,

// RULES HERE FOR bearish SIGNAL OR PUT
if (downarrow> 45
&& downarrow <9999999
downarrow2> 67
&& downarrow2 <9999999) {
Down [i] = High [i] + 5 * Point;
if (Open [i]> Close [i-1]) {
WinBuffer [i-1] = High [i-1] + 5 * Point,
Print ( "Win at" + TimeToStr (Time [i]));
total ++
wins ++;
} else if ( Open [i] == close [i-1]) {
print ( "Tie at" + TimeToStr (Time [i]));
LossBuffer [i-1] = High [i-1] + 5 * Point,
ties ++;
total ++;
} else {
losses ++;
LossBuffer [i-1] = High [i-1] + 5 * Point,
Print ( "Loss at" + TimeToStr (Time [i]));

total ++; 

I would appreciate any advice, thank you. 

Trying to read any version using "tma centered" as a signal is going to disappoint you : centered TMA recalculates/repaints, and you shall soon find out that the alerts you got are not valid any more due to the recalculating/repainting
 
Mladen Rakic:
Trying to read any version using "tma centered" as a signal is going to disappoint you : centered TMA recalculates/repaints, and you shall soon find out that the alerts you got are not valid any more due to the recalculating/repainting

 

I have tried creating ea signal for RSI alone, and it does indeed give lots of false signals, but hence i don`t have mq4 file for second indie, i can`t combine them together online, and need to find different approach.

That`s why i have second indicator which gives an confirmation for TMA. Of course TMA alone gives false signals and entries.

Reason: