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.
So when VQ and QQEA buy signal agree at the same time, place a Buy trade?
EDIT: Looks like a trade was placed but not when they both triggered a sell at the same time but just when both indicators are in a downward motion. How do I set it to only place the trade at the moment they signal and not later?
Last edited by matrixebiz; 02-01-2008 at 01:18 PM.
This code will buy when the previous value of both indicators moved up. So lets say VQ0=1.02 (shift is current bar) and VQ1 = 1 (shift is 1), QQEA0=2.5 and QQEA1 =2.4 then the rule will be true because VQ0>VQ1 and QQEA0>QQEA1. The entry will happen on te following bar. This is why the sell tade happened. Both moved down on previous bar.
So when you program entries in EA think about what you actually program.
double QQEA0 = iCustom(NULL, 0, "QQEA",5,14,4.236, 0, 0); means you use the custom indicator Null = any pair (current pair you test on) 0=any timeframe, "QQEA" is the indicator you use, 5,14,4.236 is your extern inputs for the indicator and 0 is the buffer (it can be 0 to 7) and 0 is the shift (is it the current bar, previous or say 10 bars ago. The shift can be anything.
So when you use icustom you must decide which buffer you want to use. So look at the values on your indicator and decide which buffer you want to use and how to use it. I hope this help you.
This code will buy when the previous value of both indicators moved up. So lets say VQ0=1.02 (shift is current bar) and VQ1 = 1 (shift is 1), QQEA0=2.5 and QQEA1 =2.4 then the rule will be true because VQ0>VQ1 and QQEA0>QQEA1. The entry will happen on te following bar. This is why the sell tade happened. Both moved down on previous bar.
So when you program entries in EA think about what you actually program.
double QQEA0 = iCustom(NULL, 0, "QQEA",5,14,4.236, 0, 0); means you use the custom indicator Null = any pair (current pair you test on) 0=any timeframe, "QQEA" is the indicator you use, 5,14,4.236 is your extern inputs for the indicator and 0 is the buffer (it can be 0 to 7) and 0 is the shift (is it the current bar, previous or say 10 bars ago. The shift can be anything.
So when you use icustom you must decide which buffer you want to use. So look at the values on your indicator and decide which buffer you want to use and how to use it. I hope this help you.
OK, thank you. So should I use a shift of all '1' because I want the EA to check on candle open what the previous candle did then trade if all indicators agree? How do I make sure it only trades at first signal and not later if indicators continue in a direction?
Hi, I've changed the code so that it enter trades. Two versions. One only trade when their is an up or down arrow (My first EA2) and the other one trades when the indicator moves upward so if previous trade was profitable or loss and VQ still moves up it will enter another buy trade. I hope this help.It isn't the best coding but then the EA is spagetti code.
Regards
Derik
Derik, what is wrong here? I'm trying to add another indicator.
Looks like the QQEA indicator doesn't like the up3 down3 stuff What should I use with this indicator so it only trades once per first signal? Gives this error in the Journal tab;
2008.02.02 18:09:52 TestGenerator: unmatched data error (high value 1.9634 at 2008.01.24 11:38 and price 1.9651 mismatched)
Last edited by matrixebiz; 02-02-2008 at 11:10 PM.
Add the following to the buy entry:
QQE1>QQE2 && QQE3<QQE4
Add the following to the sell entry:
QQE1<QQE2 && QQE3>QQE4
So I think the custom indicator name is wrong.... it must be QQE according to your graph - QQE is the compiled name of the indcator.
The indicator give two values for each bar stored in buffer 0 and 1. So the previous bar value1 (iCustom(NULL, 0, "QQE",5, 0, 1) must be higher than value2 (iCustom(NULL, 0, "QQE",5, 1, 1) and value1 two bars ago must be smaller (iCustom(NULL, 0, "QQE",5, 0, 2) the value2 two bars ago (iCustom(NULL, 0, "QQE",5, 1, 2). This is for a buy signal.
My QQE indicator only have one extern in the indicator - iCustom(NULL, 0, "QQE",5, 0, 1); It is equal to 5 if you have more than one extern you have to add it.
My QQE indicator only have one extern in the indicator - iCustom(NULL, 0, "QQE",5, 0, 1); It is equal to 5 if you have more than one extern you have to add it.
Ok, thank you.
One more please See pic, three different indicators what Two of them do is it has two Lines with Red and Blue. On each indicator, when they both Turn blue at the same time trade Long or when they both turn Red at the same time go short. See pic. The third one only has one line. Please tell how to iCustom these ones, please. Thanks again.