Moving AveragesHelp me to calculate slope

1
I have this indicator called Braid Filter
I am trying to modify it a bit to use it in EA for the purpose of backtesting.
this indicator contains 3 lines: Bullish line, bearish line, and Filter when crossover between bull and bear line happen and the cross surpasses the filter line that is a trend. check the pic below. I modified the code to display one line bounded by {1 & -1}, when line > 0 bullish , when line < 0 bearish when line = 0 no trade,
now I want to measure the slope of the cross over after it passes the filter line, and only display the signal when the slop is positive ;
can someone please help me with this, I tried Current - Current[i+1] but it didn't work

thanks in advance


Re: Help me to calculate slope

2
Eddie_83 wrote: Fri Apr 23, 2021 3:08 am I have this indicator called Braid Filter
I am trying to modify it a bit to use it in EA for the purpose of backtesting.
this indicator contains 3 lines: Bullish line, bearish line, and Filter when crossover between bull and bear line happen and the cross surpasses the filter line that is a trend. check the pic below.
gdfs.JPG
I modified the code to display one line bounded by {1 & -1}, when line > 0 bullish , when line < 0 bearish when line = 0 no trade,
now I want to measure the slope of the cross over after it passes the filter line, and only display the signal when the slop is positive ;
can someone please help me with this, I tried Current - Current[i+1] but it didn't work

thanks in advance


One way if current slope > previous slope = bullish slope and the opposite for bearish but in your indicators case not exactly sure.

Re: Help me to calculate slope

3
mrtools wrote: Fri Apr 23, 2021 3:22 am One way if current slope > previous slope = bullish slope and the opposite for bearish but in your indicators case not exactly sure.
hello Mr tools
I meant the slop of the Crossup curve not the curve I made
I forgot to attach the mql4 files. please take a look
the original code my modified code thanks in advance


Who is online

Users browsing this forum: No registered users and 9 guests