Dark Theme
Light Theme
Trading Articles
Article Categories
Article Tools
Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Updated November 25, 2021
trending_up
3,864 views
thumb_up
8 thanks given
group
3 followers
forum
16 posts
attach_file
0 attachments
November 24th, 2021, 04:33 PM
Akron, OH
Posts: 7 since Nov 2021
Thanks Given: 0
Thanks Received: 3
ABCTG
10handles,
you are trying to call the Moneyflow results from a function that computes the ADX. Take a look at the build in Moneyflow indicator that gives you a good idea on how to call the moneyflow function and use the value later in your code.
In
Easylanguage you can reference values from previous bars by adding a square bracket to your variable. The number within the brackets is the number of bars you want to go back where 0 is the current bar.
So oMoneyFlow[1] would be the value from the previous bar. You will need to use this to check if the moneyflow is rising or falling.
Regards,
ABCTG
Hello
I have a simialr issue and was wondering if you could help me. I use an indicator called StochRSI, here is the easy language:
{StoRSI}
inputs: RSILen(12), StoLen(20), MA(3), MA2(5);
vars: PV(0), pvt(0), pvb(0);
vars: OverBought(80), OverSold(20), Middle (50);
Vars: Sum(0), Counter(0);
pvt = RSI(Close, RSILen) - Lowest(RSI(Close, RSILen), STOLen);
pvb = Highest(RSI(Close, RSILen), STOLen) - Lowest(RSI(Close, RSILen), STOLen);
Sum = 0;
For counter = 0 To MA - 1 Begin
pvt = (RSI(Close, RSILen) - Lowest(RSI(Close, RSILen), STOLen)) of counter bars ago;
pvb = (Highest(RSI(Close, RSILen), STOLen) - Lowest(RSI(Close, RSILen), STOLen)) of counter bars ago;
PV = iff(pvb > 0, pvt/pvb, 0);
Sum = Sum + PV;
End;
PV = iff(MA > 0, Sum / MA, 0);
plot1(PV*100, "StoRSI");
plot2(average(PV,MA2)*100, "StoRSI2");
plot3(OverBought, "OB");
plot4(OverSold, "OS");
Plot5(Middle, "M");
I would like to create a scan that will tell when the StoRSI2 indicator is rising or falling. For instance below 100 and falling or above 0 and rising. Any help would be greatly appreciated!
November 25th, 2021, 03:56 AM
Posts: 2,439 since Apr 2013
Thanks Given: 486
Thanks Received: 1,631
clockworkman,
one way to approach this is to assign the value you plot as "StoRSI2" to a variable. Then you can compare the current bar's value against the previous bar's value (see the reply for 10handles for how to do that) and trigger an alert or use a plot to display this information. Both the alert or plot could be used in a scan.
Regards,
ABCTG
clockworkman
Hello
I have a simialr issue and was wondering if you could help me. I use an indicator called StochRSI, here is the easy language:
{StoRSI}
inputs: RSILen(12), StoLen(20), MA(3), MA2(5);
vars: PV(0), pvt(0), pvb(0);
vars: OverBought(80), OverSold(20), Middle (50);
Vars: Sum(0), Counter(0);
pvt = RSI(Close, RSILen) - Lowest(RSI(Close, RSILen), STOLen);
pvb = Highest(RSI(Close, RSILen), STOLen) - Lowest(RSI(Close, RSILen), STOLen);
Sum = 0;
For counter = 0 To MA - 1 Begin
pvt = (RSI(Close, RSILen) - Lowest(RSI(Close, RSILen), STOLen)) of counter bars ago;
pvb = (Highest(RSI(Close, RSILen), STOLen) - Lowest(RSI(Close, RSILen), STOLen)) of counter bars ago;
PV = iff(pvb > 0, pvt/pvb, 0);
Sum = Sum + PV;
End;
PV = iff(MA > 0, Sum / MA, 0);
plot1(PV*100, "StoRSI");
plot2(average(PV,MA2)*100, "StoRSI2");
plot3(OverBought, "OB");
plot4(OverSold, "OS");
Plot5(Middle, "M");
I would like to create a scan that will tell when the StoRSI2 indicator is rising or falling. For instance below 100 and falling or above 0 and rising. Any help would be greatly appreciated!
November 25th, 2021, 07:12 AM
Akron, OH
Posts: 7 since Nov 2021
Thanks Given: 0
Thanks Received: 3
ABCTG
clockworkman,
one way to approach this is to assign the value you plot as "StoRSI2" to a variable. Then you can compare the current bar's value against the previous bar's value (see the reply for 10handles for how to do that) and trigger an alert or use a plot to display this information. Both the alert or plot could be used in a scan.
Regards,
ABCTG
Hello ABCTG
Thank you for the reply. Would I add the StoRSI2 variable with the other variables in this code or start at the bottom or does it not matter? I am new to easylanguage . I think I can follow your other example to get the current bar vs previous bar and add that to the end of the current code.
Thanks!
November 25th, 2021, 08:29 AM
Posts: 2,439 since Apr 2013
Thanks Given: 486
Thanks Received: 1,631
clockworkman,
this is up to you. In the interest of writing code that is easier to read and maintain it can make sense to declare all variables in one place, though.
Regards,
ABCTG
clockworkman
Hello ABCTG
Thank you for the reply. Would I add the StoRSI2 variable with the other variables in this code or start at the bottom or does it not matter? I am new to
easylanguage . I think I can follow your other example to get the current bar vs previous bar and add that to the end of the current code.
Thanks!
November 25th, 2021, 09:46 AM
Akron, OH
Posts: 7 since Nov 2021
Thanks Given: 0
Thanks Received: 3
ABCTG
clockworkman,
this is up to you. In the interest of writing code that is easier to read and maintain it can make sense to declare all variables in one place, though.
Regards,
ABCTG
Here is what I have come up with based on your previous post. I am getting a "more inputs expected here" error on Value1 when trying to verify. Thoughts?
{StoRSI}
inputs: RSILen(12), StoLen(20), MA(3), MA2(5);
vars: PV(0), pvt(0), pvb(0);
vars: OverBought(80), OverSold(20), Middle (50);
Vars: Sum(0), Counter(0);
pvt = RSI(Close, RSILen) - Lowest(RSI(Close, RSILen), STOLen);
pvb = Highest(RSI(Close, RSILen), STOLen) - Lowest(RSI(Close, RSILen), STOLen);
Sum = 0;
For counter = 0 To MA - 1 Begin
pvt = (RSI(Close, RSILen) - Lowest(RSI(Close, RSILen), STOLen)) of counter bars ago;
pvb = (Highest(RSI(Close, RSILen), STOLen) - Lowest(RSI(Close, RSILen), STOLen)) of counter bars ago;
PV = iff(pvb > 0, pvt/pvb, 0);
Sum = Sum + PV;
End;
PV = iff(MA > 0, Sum / MA, 0);
plot1(PV*100, "StoRSI");
plot2(average(PV,MA2)*100, "StoRSI2");
plot3(OverBought, "OB");
plot4(OverSold, "OS");
Plot5(Middle, "M");
variables:
vDirection ( 0 ),
StoRSI2( 0 ) ;
Value1 = DirMovement( StoRSI2 ) ;
if StoRSI2 > StoRSI2[1] then
vDirection = + 1
else
vDirection = 0 ;
Plot6( vDirection, "Direction" ) ;
November 25th, 2021, 11:41 AM
Posts: 2,439 since Apr 2013
Thanks Given: 486
Thanks Received: 1,631
clockworkman,
DirMovement has no relevance for your particular problem. At least it is not clear from your code why you are using it. You could simply move the variable declaration to the top where the other variables are declared and initialized. This would allow you to add the below before plot1:
Code
StoRSI2 = average(PV,MA2)*100 ;
plot1(PV*100, "StoRSI");
plot2(StoRSI2, "StoRSI2");
Now your direction check should work, if you follow the steps I described above (including moving the declaration of StoRSI2 to the top)..
Regards,
ABCTG
clockworkman
Here is what I have come up with based on your previous post. I am getting a "more inputs expected here" error on Value1 when trying to verify. Thoughts?
{StoRSI}
inputs: RSILen(12), StoLen(20), MA(3), MA2(5);
vars: PV(0), pvt(0), pvb(0);
vars: OverBought(80), OverSold(20), Middle (50);
Vars: Sum(0), Counter(0);
pvt = RSI(Close, RSILen) - Lowest(RSI(Close, RSILen), STOLen);
pvb = Highest(RSI(Close, RSILen), STOLen) - Lowest(RSI(Close, RSILen), STOLen);
Sum = 0;
For counter = 0 To MA - 1 Begin
pvt = (RSI(Close, RSILen) - Lowest(RSI(Close, RSILen), STOLen)) of counter bars ago;
pvb = (Highest(RSI(Close, RSILen), STOLen) - Lowest(RSI(Close, RSILen), STOLen)) of counter bars ago;
PV = iff(pvb > 0, pvt/pvb, 0);
Sum = Sum + PV;
End;
PV = iff(MA > 0, Sum / MA, 0);
plot1(PV*100, "StoRSI");
plot2(average(PV,MA2)*100, "StoRSI2");
plot3(OverBought, "OB");
plot4(OverSold, "OS");
Plot5(Middle, "M");
variables:
vDirection ( 0 ),
StoRSI2( 0 ) ;
Value1 = DirMovement( StoRSI2 ) ;
if StoRSI2 > StoRSI2[1] then
vDirection = + 1
else
vDirection = 0 ;
Plot6( vDirection, "Direction" ) ;
November 25th, 2021, 01:12 PM
Akron, OH
Posts: 7 since Nov 2021
Thanks Given: 0
Thanks Received: 3
ABCTG
clockworkman,
DirMovement has no relevance for your particular problem. At least it is not clear from your code why you are using it. You could simply move the variable declaration to the top where the other variables are declared and initialized. This would allow you to add the below before plot1:
Code
StoRSI2 = average(PV,MA2)*100 ;
plot1(PV*100, "StoRSI");
plot2(StoRSI2, "StoRSI2");
Now your direction check should work, if you follow the steps I described above (including moving the declaration of StoRSI2 to the top)..
Regards,
ABCTG
Thank you, that worked. I removed DirMovement after I downloaded the easylanguage manual and realized it made no sense for what I needed.
Last Updated on November 25, 2021