Behold97 wrote:Thu May 20, 2021 8:38 pm
As I understand the "rules" for the indicator correct, the signal gets triggered when each color respectively breaks threw the golden line. But there are never 2 sell/buy signals in a row. Seems to me that there always has to be a buy signal after a sell signal.
Now correct me if iam wrong but thats how I understand it from looking at the indicator and its thread.
I want to backtest the indicator and its capabilities.
Sadly I dont know how to implement that special rule that the same signal cant be twice after each other. Having the arrows in buffers (if sell signal = true then buffer = 1)would make it easy, but i would understand if it is to much work to do. Iam using fxdreema to backtest it.
Thanks for your response!
On this I have upVal = buffer 2, dnVal = buffer 3, and ItLevel = buffer 4 . If upVal > ItLevel = buy and if dnVal > ItLev = sell. Also you can use the trend buffer which is buffer 5 and call it similar to this
Code: Select all
#define _doNothing 0
#define _doBuy 1
#define _doSell 2
void OnTick()
{
int doWhat = _doNothing;
double hull_trend_current = iCustom(NULL,0,"Adaptive - jurik filter (mtf + alerts + fl's)",PERIOD_CURRENT,Length,Phase,Double,AtrLength,AtrPhase,AtrDouble,Price,Filter,FilterType,LevelType,MinMaxPeriod,KATR,LevelUp,LevelDn,ColorOn,12,BarToUse);
double hull_trend_previous = iCustom(NULL,0,"Adaptive - jurik filter (mtf + alerts + fl's)",PERIOD_CURRENT,Length,Phase,Double,AtrLength,AtrPhase,AtrDouble,Price,Filter,FilterType,LevelType,MinMaxPeriod,KATR,LevelUp,LevelDn,ColorOn,12,BarToUse+1);
if (hull_trend_current!=hull_trend_previous)
if (hull_trend_current==1)
doWhat = _doBuy;
else doWhat = _doSell;
Of course you need to change the iCustom to match the Itrend.