Page 13 of 24
Re: No Nonsense Forex - Indicators
Posted: Sat Dec 03, 2022 10:10 am
by rambo
Centaur wrote: Thu Dec 01, 2022 4:13 pm
Hi rambo,
Please if you could share the mq4 file, I cannot see the source code with an ex4 file
Hello Centaur, i tried finding an mq4l file, but nobody seem to have it :/
Could u do me favour and convert this MT5 indicator into MT4, it's a great confirmation & volume tool and i wanna test it on my mt4 algorithm
https://www.mql5.com/en/code/22976
Thanks!
Re: No Nonsense Forex - Indicators
Posted: Sat Dec 03, 2022 10:14 am
by rambo
Also i found this indicator made by CQ,
https://cqindicators.com/mt4_indicators/dpo_volume.html
His indicators are amazing, especially this one. Too bad he only offers mt4 files, if u could convert this into mt5 i know for a fact this would benefit the NNFX community.
Really appreciate the work u put in!
Re: No Nonsense Forex - Indicators
Posted: Sat Dec 03, 2022 6:39 pm
by sylvester21
rambo wrote: Sat Dec 03, 2022 10:14 am
Also i found this indicator made by CQ,
https://cqindicators.com/mt4_indicators/dpo_volume.html
His indicators are amazing, especially this one. Too bad he only offers mt4 files, if u could convert this into mt5 i know for a fact this would benefit the NNFX community.
Really appreciate the work u put in!
Hi Rambo,
Try using TDFIX for volume. Not the best, but it'll do the job.
Baseline/main confirmation = SSL Deviation Scaled EMA
Exit = ATR Exit
I'm also a searching for NNFX-style indicators aggressively.
Re: No Nonsense Forex - Indicators
Posted: Tue Dec 06, 2022 12:51 am
by memirxan
hello to all of you my friends.. I just joined you.. I had a question without disturbing you.. I liked the alpha trend indicator very much, but I couldn't code the notification event.. is there anyone or a resource on the site that can help with the notification event that comes with the signal? I'm sorry I'm missing a lot of indicators..thanks in advance.
Re: No Nonsense Forex - Indicators
Posted: Tue Dec 06, 2022 2:38 am
by Centaur
memirxan wrote: Tue Dec 06, 2022 12:51 am
hello to all of you my friends.. I just joined you.. I had a question without disturbing you.. I liked the alpha trend indicator very much, but I couldn't code the notification event.. is there anyone or a resource on the site that can help with the notification event that comes with the signal? I'm sorry I'm missing a lot of indicators..thanks in advance.
Try this:
https://www.mql5.com/en/docs/network/sendnotification
https://www.mql5.com/en/docs/network/sendmail
https://www.mql5.com/en/docs/common/alert
Code: Select all
if(Buy_Signal[i] != EMPTY_VALUE)
SendNotification("Buy Signal Triggered!");
if(Sell_Signal[i] != EMPTY_VALUE)
SendNotification("Sell Signal Triggered!");
Re: No Nonsense Forex - Indicators
Posted: Tue Dec 06, 2022 3:06 am
by memirxan
dude, thank you very much for your answer..but i tried it, both buy and sell signals come in seconds..i took a screenshot to see if i am typing the code in the wrong place..
Re: No Nonsense Forex - Indicators
Posted: Tue Dec 06, 2022 4:40 am
by Centaur
memirxan wrote: Tue Dec 06, 2022 3:06 am
dude, thank you very much for your answer..but i tried it, both buy and sell signals come in seconds..i took a screenshot to see if i am typing the code in the wrong place..
For more than one statement in an if statement you need to use parenthesis:
if(Buy_Signal
!= EMPTY_VALUE)
{
SendNotification("Buy Signal Triggered!");
Alert...
}
Re: No Nonsense Forex - Indicators
Posted: Tue Dec 06, 2022 5:24 am
by memirxan
Centaur wrote: Tue Dec 06, 2022 4:40 am
For more than one statement in an if statement you need to use parenthesis:
if(Buy_Signal
!= EMPTY_VALUE)
{
SendNotification("Buy Signal Triggered!");
Alert...
}
Buy_Signal [ i ] != EMPTY_VALUE
I have to choose [ i ] option because , if I choose Buy_Signal !=EMPTY_VALUE , I take error' Buy_Signal' - invalid array access..
And the other problem on screeshot
Re: No Nonsense Forex - Indicators
Posted: Tue Dec 06, 2022 7:53 am
by Centaur
memirxan wrote: Tue Dec 06, 2022 5:24 am
Buy_Signal [ i ] != EMPTY_VALUE
I have to choose [ i ] option because , if I choose Buy_Signal !=EMPTY_VALUE , I take error' Buy_Signal' - invalid array access..
And the other problem on screeshot
Yes it will give all signals in history, to limit this to new signals only you can do the following:
Code: Select all
//--- calculate start position
int bar;
if(prev_calculated == 0)
{
bar = 0;
int bar_cnt = Bars(_Symbol, _Period);
}
else
bar = prev_calculated - 1;
//--- main loop
for(int i = bar; i < rates_total && !_StopFlag; i++)
{
if(i > length)
{
//--- calculate alpha trend
ATR[i] = fSMA(i, length, TR);
UpTrend[i] = low[i] - ATR[i] * atr_multiplier;
DownTrend[i] = high[i] + ATR[i] * atr_multiplier;
Alpha_Calc[i] = (inp_change_calc == No ? RSI[i] >= 50 : MFI[i] >= 50) ? UpTrend[i] < Alpha_Calc[i - 1] ? Alpha_Calc[i - 1] : UpTrend[i] : DownTrend[i] > Alpha_Calc[i - 1] ? Alpha_Calc[i - 1] : DownTrend[i];
//--- plot alpha trend
Alpha[i] = NormalizeDouble(Alpha_Calc[i], _Digits);
Offset[i] = NormalizeDouble(Alpha_Calc[i - 2], _Digits);
//--- plot buy and sell signals
Buy_Signal_Calc[i] = Alpha[i] > Offset[i] && Alpha[i - 1] <= Offset[i - 1] ? 1.0 : 0.0;
Sell_Signal_Calc[i] = Alpha[i] < Offset[i] && Alpha[i - 1] >= Offset[i - 1] ? 1.0 : 0.0;
Buy_BarCount[i] = fBarsSince(i, Buy_Signal_Calc);
Sell_BarCount[i] = fBarsSince(i, Sell_Signal_Calc);
Arrows[i] = Buy_BarCount[i] > Sell_BarCount[i] ? 1.0 : -1.0;
Buy_Signal[i] = inp_signals == No ? EMPTY_VALUE : Arrows[i] == -1.0 && Arrows[i - 1] == 1.0 ? Offset[i] : EMPTY_VALUE;
Sell_Signal[i] = inp_signals == No ? EMPTY_VALUE : Arrows[i] == 1.0 && Arrows[i - 1] == -1.0 ? Offset[i] : EMPTY_VALUE;
if(Buy_Signal[i] != EMPTY_VALUE && i > bar_cnt)
{
SendNotification("Buy Signal was Triggered!");
Alert("Buy Signal was Triggered!");
}
if(Sell_Signal[i] != EMPTY_VALUE && i > bar_cnt)
{
SendNotification("Sell Signal was Triggered!");
Alert("Sell Signal was Triggered!");
}
}
}
Re: No Nonsense Forex - Indicators
Posted: Wed Dec 07, 2022 4:56 am
by memirxan
Centaur wrote: Tue Dec 06, 2022 7:53 am
Yes it will give all signals in history, to limit this to new signals only you can do the following:
Code: Select all
//--- calculate start position
int bar;
if(prev_calculated == 0)
{
bar = 0;
int bar_cnt = Bars(_Symbol, _Period);
}
else
bar = prev_calculated - 1;
//--- main loop
for(int i = bar; i < rates_total && !_StopFlag; i++)
{
if(i > length)
{
//--- calculate alpha trend
ATR[i] = fSMA(i, length, TR);
UpTrend[i] = low[i] - ATR[i] * atr_multiplier;
DownTrend[i] = high[i] + ATR[i] * atr_multiplier;
Alpha_Calc[i] = (inp_change_calc == No ? RSI[i] >= 50 : MFI[i] >= 50) ? UpTrend[i] < Alpha_Calc[i - 1] ? Alpha_Calc[i - 1] : UpTrend[i] : DownTrend[i] > Alpha_Calc[i - 1] ? Alpha_Calc[i - 1] : DownTrend[i];
//--- plot alpha trend
Alpha[i] = NormalizeDouble(Alpha_Calc[i], _Digits);
Offset[i] = NormalizeDouble(Alpha_Calc[i - 2], _Digits);
//--- plot buy and sell signals
Buy_Signal_Calc[i] = Alpha[i] > Offset[i] && Alpha[i - 1] <= Offset[i - 1] ? 1.0 : 0.0;
Sell_Signal_Calc[i] = Alpha[i] < Offset[i] && Alpha[i - 1] >= Offset[i - 1] ? 1.0 : 0.0;
Buy_BarCount[i] = fBarsSince(i, Buy_Signal_Calc);
Sell_BarCount[i] = fBarsSince(i, Sell_Signal_Calc);
Arrows[i] = Buy_BarCount[i] > Sell_BarCount[i] ? 1.0 : -1.0;
Buy_Signal[i] = inp_signals == No ? EMPTY_VALUE : Arrows[i] == -1.0 && Arrows[i - 1] == 1.0 ? Offset[i] : EMPTY_VALUE;
Sell_Signal[i] = inp_signals == No ? EMPTY_VALUE : Arrows[i] == 1.0 && Arrows[i - 1] == -1.0 ? Offset[i] : EMPTY_VALUE;
if(Buy_Signal[i] != EMPTY_VALUE && i > bar_cnt)
{
SendNotification("Buy Signal was Triggered!");
Alert("Buy Signal was Triggered!");
}
if(Sell_Signal[i] != EMPTY_VALUE && i > bar_cnt)
{
SendNotification("Sell Signal was Triggered!");
Alert("Sell Signal was Triggered!");
}
}
}
hello again mate, I tried the code you gave, but it gives bar_cnt error. I'm sorry I made you tired