Detect when ema 50 is at Rsi level 90 or ema 50 is at rsi level 10, when ema 50 is placed on same rsi window
Detect when ema 50 is at Rsi level 90 or ema 50 is at rsi level 10, when ema 50 is placed on same rsi window
Loading saved threads...
Bill Mayheptad Ritchie · External communityPost link
External question — Stack Overflow Stack Exchange
Author: Bill Mayheptad Ritchie
Original post: https://stackoverflow.com/questions/65241372
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Hello fellow trader and programmer, I wanted to build an EA for a strategy, and the strategy entails that I place ema 50 on the same rsi window and I will place a buy order when rsi is at level 30 or below and ema 50 is at rsi level 10 or below. then I will place a sell order when rsi is at level 70 or above and ema 50 is at rsi level 90 or above. I know I can get the value of rsi with the IRSI() function. But how can I detect when ema 50 is at rsi level 90. or when ema 50 is at rsi level 10?
Quote
Report
user3666197 · External communityPost link
External answer — Stack Overflow Stack Exchange
Author: user3666197
Original post: https://stackoverflow.com/a/65248728
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Q
:
"How possible is it to get the price of currency pair when RSI is at level 70, 80, or 90"
Short version:
there is no way to get it "from" RSI level
Why?
Read the graph and check, how many times the RSI-indicator touched or crossed the level of 30% ( on the "oversold" end of the interval of 0..100 percent scale )
Now, for each that moment in time, see the actual
Close[i]
. Are they all the same or do they differ for each such moment in time, when
iRSI() == 30%
?
They are different, and a lot, aren't they?
That is the reason one can never say an actual
Close[i]
just from an
iRSI()
-level.
Q.E.D.
Quote
Report
Bodhi Mantra · External communityPost link
External answer — Stack Overflow Stack Exchange
Author: Bodhi Mantra
Original post: https://stackoverflow.com/a/72674915
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
double AUDJPYRSID = NormalizeDouble(iRSI("AUDJPY",
PERIOD_D1,14,PRICE_CLOSE,0),0);
double AUDCADDLOW=0;
if(AUDCADRSID==30)
{
AUDCADDLOW=GetCurrentPrice("AUDCAD","ask");
}
double GetCurrentPrice(string symbol, string type)
{
double price=0.0;
if(type=="bid")
{
price=MarketInfo(symbol, MODE_BID);
}
else
{
price=MarketInfo(symbol, MODE_ASK);
}
return price;
}
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Stack Overflow Stack Exchange Author: Bodhi Mantra Source score (net votes, not local likes): 0 Original post: https://stackoverflow.com/a/72674915 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. double AUDJPYRSID = NormalizeDouble(iRSI("AUDJPY", PERIOD_D1,14,PRICE_CLOSE,0),0); double AUDCADDLOW=0; if(AUDCADRSID==30) { AUDCADDLOW=GetCurrentPrice("AUDCAD","ask"); } double GetCurrentPrice(string symbol, string type) { double price=0.0; if(type=="bid") { price=MarketInfo(symbol, MODE_BID); } else { price=MarketInfo(symbol, MODE_ASK); } return price; }
Checking account access…