Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
If I understand it right, you want your EA to treat an unbroken series of indicator agreement as "one signal", rather than that each occasion of agreement is a signal.
One way to do so, is to make it a stateful EA and use a design as follows:
PHP Code:
static int last_signal = 0; int signal = 0; if ( <buy conditions hold> ) signal = 1; if ( <sell conditions hold> ) signal = -1; if ( signal != 0 && signal != last_signal ) { // New signal series... } last_signal = signal;
If I understand it right, you want your EA to treat an unbroken series of indicator agreement as "one signal", rather than that each occasion of agreement is a signal.
One way to do so, is to make it a stateful EA and use a design as follows:
PHP Code:
static int last_signal = 0;
int signal = 0;
if ( <buy conditions hold> ) signal = 1;
if ( <sell conditions hold> ) signal = -1;
if ( signal != 0 && signal != last_signal ) {
// New signal series...
}
last_signal = signal;
It would be nice if you, TheRumpledOne, also learn how to attach images rather than make them inline; with the junk you paste in, it just wastes a lot of space.
It would be nice if you, TheRumpledOne, also learn how to attach images rather than make them inline; with the junk you paste in, it just wastes a lot of space.
mode - Line index. Can be from 0 to 7 and must correspond with the index used by one of SetIndexBuffer functions. shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
Use MODE to tell your indicator what buffer you want. The support resistance indicators may use buffer 0 ( MODE=0 ) for resistance and buffer 1 ( MODE=1 ) for support.
SHIFT says to use the value from Bar(SHIFT) of the indicator called by iCustom.
mode - Line index. Can be from 0 to 7 and must correspond with the index used by one of SetIndexBuffer functions. shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
Use MODE to tell your indicator what buffer you want. The support resistance indicators may use buffer 0 ( MODE=0 ) for resistance and buffer 1 ( MODE=1 ) for support.
SHIFT says to use the value from Bar(SHIFT) of the indicator called by iCustom.
Does that help?
Ok, I get Shift, will have to do more reading about Mode.
Do you code? I have this indicator that I call from my EA but not sure how to set it up properly. See pic.
it just has two lines and when Blue changes and lines up with the other line, Long signal is generated (Same idea with Red)
Tried a few different codes like the one I used with the VQ indicator;
double Entry1 = iCustom(NULL, 0, "VQ", 24, 30....., 0, 1);
double Entry2 = iCustom(NULL, 0, "VQ", 24, 30....., 0, 2);
double Up2 = iCustom(NULL, 0, "VQ", 24, 30....., 1, 2);
double Down2 = iCustom(NULL, 0, "VQ", 24, 30....., 2, 2);
Ok, I get Shift, will have to do more reading about Mode.
Do you code? I have this indicator that I call from my EA but not sure how to set it up properly. See pic.
it just has two lines and when Blue changes and lines up with the other line, Long signal is generated (Same idea with Red)
Tried a few different codes like the one I used with the VQ indicator;
double Entry1 = iCustom(NULL, 0, "VQ", 24, 30....., 0, 1);
double Entry2 = iCustom(NULL, 0, "VQ", 24, 30....., 0, 2);
double Up2 = iCustom(NULL, 0, "VQ", 24, 30....., 1, 2);
double Down2 = iCustom(NULL, 0, "VQ", 24, 30....., 2, 2);
Just not trading right.
Thanks
If you are referring to the bottom indicator, which seems to be named "#MTF CI", then I think that possibly that indicator has 4 buffers: one each for the two colors of each line. You can bring up the Data Window (ctrl-D) to see which buffers the indicators have, as well as their indexes (the MODE argument to the iCustom call).