Once again I want to say that I'm and absolute newbie in coding and I am just teaching myself.
I am trying to code and indicator arrow where I need each several conditions to be met and used the && function.
I then require only one 3 or 4 other conditions to be met and I use the || function. But this where my limitations as a coder are exposed as I seem to be having a few errors.
Below is a piece of the code I am trying put together. Any assistance to fixing my errors would be grateful.
Code: Select all
//Indicator Buffer 1
if (iCustom(NULL, PERIOD_CURRENT, "SDV-ADX histogram oscillator", ADX1, true, 0, 1, i) <= Increase_BuyThreshold && iCustom(NULL, PERIOD_CURRENT, "SDV-ADX histogram oscillator", ADX1, true, 0, 1, i) > 0 //SDV-ADX histogram oscillator <= fixed value but greater than 0
&& iCustom(NULL, PERIOD_CURRENT, "SDV-ADX histogram oscillator", ADX2, true, 0, 1, i) <= Increase_BuyThreshold && iCustom(NULL, PERIOD_CURRENT, "SDV-ADX histogram oscillator", ADX2, true, 0, 1, i) > 0 //SDV-ADX histogram oscillator <= fixed value but greater than 0
&& iCustom(NULL, PERIOD_CURRENT, "SDV-ADX histogram oscillator", ADX3, true, 0, 1, i) <= Increase_BuyThreshold && iCustom(NULL, PERIOD_CURRENT, "SDV-ADX histogram oscillator", ADX3, true, 0, 1, i) > 0 //SDV-ADX histogram oscillator <= fixed value but greater than 0
&& iCCI(NULL, PERIOD_CURRENT, CCIPeriod, PRICE_TYPICAL, i) > 0 //Commodity Channel Index > fixed value
&& iCCI(NULL, PERIOD_CURRENT, CCIPeriod, PRICE_TYPICAL, i) < 200 //Commodity Channel Index < fixed value
&& iRSI(NULL, PERIOD_CURRENT, RSI_Period, PRICE_CLOSE, i) >= 50 //Relative Strength Index >= fixed value
&& iRSI(NULL, PERIOD_CURRENT, RSI_Period, PRICE_CLOSE, i) < RSI_OverBought //Relative Strength Index < fixed value
)
&& ((iCustom(NULL, PERIOD_CURRENT, "SDV-ADX histogram oscillator", ADX1, true, 0, 2, 1+i) != 0 && iCustom(NULL, PERIOD_CURRENT, "SDV-ADX histogram oscillator", ADX1, true, 0, 2, 1+i != EMPTY_VALUE) //SDV-ADX histogram oscillator is not equal to fixed value
|| (iCustom(NULL, PERIOD_CURRENT, "SDV-ADX histogram oscillator", ADX2, true, 0, 2, 1+i) != 0 && iCustom(NULL, PERIOD_CURRENT, "SDV-ADX histogram oscillator", ADX2, true, 0, 2, 1+i) != EMPTY_VALUE ) //SDV-ADX histogram oscillator is not equal to fixed value
|| (iCustom(NULL, PERIOD_CURRENT, "SDV-ADX histogram oscillator", ADX3, true, 0, 2, 1+i) != 0 && iCustom(NULL, PERIOD_CURRENT, "SDV-ADX histogram oscillator", ADX3, true, 0, 2, 1+i) != EMPTY_VALUE ) //SDV-ADX histogram oscillator is not equal to fixed value
|| (iCCI(NULL, PERIOD_CURRENT, CCIPeriod, PRICE_TYPICAL, 1+i) < 0) //Commodity Channel Index < fixed value
|| (iRSI(NULL, PERIOD_CURRENT, RSI_Period, PRICE_CLOSE, 1+i) < 50)) //Relative Strength Index < fixed value
)