Two MA price and two MA RSI

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Two MA price and two MA RSI

Postby Ephedan » Fri Sep 10, 2021 4:38 am

Hello.

I am contacting you because I am having difficulty developing my strategy.

Context :
Using two moving averages namely a 9 period MVA and a 45 period HMA.
These two moving averages are applied to both the RSI and the price.
From these two moving averages, I extracted an average of the averages.
It is with this moving averages that I work on the RSI and the price.

Strategy:
When the average of the moving averages is increasing, I go into buying.
When the average of the moving averages is decreasing, I am selling.
If I go one way and the moving averages change trend, it should close open trades.

Attachments :
I have attached the file "Arrow_RSI_MA.lua" which allows me to display on the chart when I need to enter and exit position.
I have attached the file "Averages RSI + MA Strategy.lua" which is the work I have already done on the strategy.

Demand :
1 - I cannot report my moving average average.
2 - I am not sure if the position close occurs when the trend reverses.

Thank you in advance for any help you could give me.

P.S.
If you see any inconsistencies or improvements, I welcome any comments.
Attachments
Averages RSI + MA Strategy.lua
(37.4 KiB) Downloaded 89 times
Arrow_RSI_MA.lua
(21.09 KiB) Downloaded 93 times
Ephedan
 
Posts: 15
Joined: Thu Jul 15, 2021 10:18 am

Re: Two MA price and two MA RSI

Postby Apprentice » Fri Sep 10, 2021 7:32 am

Your request is added to the development list.
Development reference 810.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36476
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Two MA price and two MA RSI

Postby Ephedan » Fri Sep 10, 2021 7:36 am

Thank you for your help.
Ephedan
 
Posts: 15
Joined: Thu Jul 15, 2021 10:18 am

Re: Two MA price and two MA RSI

Postby Apprentice » Fri Sep 10, 2021 8:44 am

Try something like this.
Arrow_RSI_MA.lua
(22.01 KiB) Downloaded 97 times

Averages RSI + MA Strategy.lua
(38.15 KiB) Downloaded 98 times


My suggestion would be to split Arrow_RSI_MA.lua into two.
One as an oscillator, one as an indicator.

Then call the two from strategy as Indicator1 and Indicator2.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36476
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Two MA price and two MA RSI

Postby Ephedan » Fri Sep 10, 2021 10:35 am

Thank you for your work and your responsiveness.

At least it works now and is much better than before ;-)

I will test all these next week. I will come back to you afterwards to inform you of the results.
I will also study your proposal. Thank you

Thank you again.

Have a nice weekend
Ephedan
 
Posts: 15
Joined: Thu Jul 15, 2021 10:18 am

Re: Two MA price and two MA RSI

Postby Ephedan » Thu Sep 16, 2021 2:54 am

Hello.

I'm coming back to you because I followed your suggestion to split Arrow_RSI_MA.lua in two.
As a result of this modification, I am encountering an error that I cannot resolve. I have attached a screenshot.

Do you have any idea how to solve this error?

I would like to take this opportunity to inform you of the updates to the other indicators.

Thank you in advance for your help.

Best regards,
Attachments
MTD_strategy - error.png
Error
MTD_strategy.lua
Strategy
(31.94 KiB) Downloaded 97 times
MTD_indicateurs.lua
Oscillator
(16.03 KiB) Downloaded 89 times
MTD_averages.lua
Indicator
(11.6 KiB) Downloaded 91 times
MTD_position_indicateurs.lua
Oscillator positions
(12.52 KiB) Downloaded 87 times
MTD_position_prix.lua
Indicator positions
(11.63 KiB) Downloaded 89 times
Ephedan
 
Posts: 15
Joined: Thu Jul 15, 2021 10:18 am

Re: Two MA price and two MA RSI

Postby Apprentice » Thu Sep 16, 2021 4:43 am

Please Upzip It.zip
(18.14 KiB) Downloaded 93 times

1. Please use "Moyenne_MA", not the "Moyenne MA"
2. Only use indicator with output stream as your strategy source.
3. Use indicator output stream name from within the strategy.
4. If MTD_position_prix or MTD_position_prix will be used,
create a simple signal output stream for them
with 1 for buy and -1 for sell...
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36476
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Majestic-12 [Bot] and 37 guests