Getting a signal from an indicator

 

I'm still learning how to program MQL4, so bear with me.

I have an indicator that gives trade signals (either buy or sell).

These signals appear after the open and before the close on the current bar. It is absolutely critical that as soon as the signal has been made, that the EA I am making opens a trade. If it misses and goes tot he next bar, we are too late.

This indicator actually displays alerts as well. If I could get the indicator to contact the EA somehow....

Is this possible? ...or it this as simple as looking at the IndexBuffer for the current bar?

 

it depends on the indicator

some arrow indicators return a huge figure when not active

ie 273444376 or something i can remember the number

you use the icustom command to read the indicator eg

double metro=(iCustom(NULL, 0, "metro",0,0));//current bar

double metrob4=(iCustom(NULL, 0, "metro",0,1));//bar before

the 0 after metro ties in with the color on the indicators color map - the one you set the colors on the indicator - thats the easiest way i remember it

now if the expert gets a huge number then i normally say

if (metro>200000) metro=0;

 

just like using optical fibre or DVD burner

change everything into LIGHT SIGNAL as soon as voice signal is given

sorry to disappoint you , many signal provider does not WORK in practice -- even it is universaly truth

probably some build in mechanisum to let it finish in just 5 minute, rather than let it PROGRESS slowing and go to the desired direction within 50 minutes

so, you have to make sure, IT DOES WORK first, and overcome the pip spread, and outweight the chance that it does not go your way

hope that you do more research than me -- on this SIGNAL when it is FIRED

repost this indicator -- someone please study it, tell us WHAT YOU FIND OUT --- so far, any universal pattern, any false POSITIVE etc

called BS -- and post us back some ScreenCapture === finding like ..... (does it need to be double of the RATIO) or signal need to close to some border or first 6 min or a 15 min bar tec

heheheh

Files:
 
Neo-Rio:
I'm still learning how to program MQL4, so bear with me.

I have an indicator that gives trade signals (either buy or sell).

These signals appear after the open and before the close on the current bar. It is absolutely critical that as soon as the signal has been made, that the EA I am making opens a trade. If it misses and goes tot he next bar, we are too late.

This indicator actually displays alerts as well. If I could get the indicator to contact the EA somehow....

Is this possible? ...or it this as simple as looking at the IndexBuffer for the current bar?

I use an EA which has many parameters and one of them is called "Confirmed On Entry". When the EA a valid signal, if I put this to TRUE then it waits for the next candle to open a trade but if I put it to FALSE then it will immediately take the trade. So yes, it definitely IS possible.

Hope this helps,

Happy trading!

Ms_Mel

 

Some very cryptic answers so far, not least the one by xx3xxx which seems to have no relevance at all to your question

The simple answer is you'll need to use the iCustom function. Just search in the metaeditor help file to find it.

Good luck

Lux

Reason: