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?
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
244 Views Asked by Bill Mayheptad Ritchie At
2
There are 2 best solutions below
3

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;
}
Related Questions in BOTS
- Dokka - skip generating javadoc for default android packages
- Dokka javadoc jar doesn't work with Intellij IDE
- How to document a primary constructor parameter with Kotlin Dokka
- How do you embed runnable sample code in Dokka generated documentation
- Dokka, Kotlin: How to get a DProperty's type? Or, in general, `DType` from `Bound`?
- Problem with dokka CLI - "Exiting Generation: Nothing to document"
- Problems setting up dokka in Maven
- Execution failed for task ':app:dokkaHtml'
- Linking JS stdlib to generated kdoc
- How can I suppress Dokka documentation for specific classes?
Related Questions in MQL4
- Dokka - skip generating javadoc for default android packages
- Dokka javadoc jar doesn't work with Intellij IDE
- How to document a primary constructor parameter with Kotlin Dokka
- How do you embed runnable sample code in Dokka generated documentation
- Dokka, Kotlin: How to get a DProperty's type? Or, in general, `DType` from `Bound`?
- Problem with dokka CLI - "Exiting Generation: Nothing to document"
- Problems setting up dokka in Maven
- Execution failed for task ':app:dokkaHtml'
- Linking JS stdlib to generated kdoc
- How can I suppress Dokka documentation for specific classes?
Related Questions in METATRADER4
- Dokka - skip generating javadoc for default android packages
- Dokka javadoc jar doesn't work with Intellij IDE
- How to document a primary constructor parameter with Kotlin Dokka
- How do you embed runnable sample code in Dokka generated documentation
- Dokka, Kotlin: How to get a DProperty's type? Or, in general, `DType` from `Bound`?
- Problem with dokka CLI - "Exiting Generation: Nothing to document"
- Problems setting up dokka in Maven
- Execution failed for task ':app:dokkaHtml'
- Linking JS stdlib to generated kdoc
- How can I suppress Dokka documentation for specific classes?
Related Questions in FOREX
- Dokka - skip generating javadoc for default android packages
- Dokka javadoc jar doesn't work with Intellij IDE
- How to document a primary constructor parameter with Kotlin Dokka
- How do you embed runnable sample code in Dokka generated documentation
- Dokka, Kotlin: How to get a DProperty's type? Or, in general, `DType` from `Bound`?
- Problem with dokka CLI - "Exiting Generation: Nothing to document"
- Problems setting up dokka in Maven
- Execution failed for task ':app:dokkaHtml'
- Linking JS stdlib to generated kdoc
- How can I suppress Dokka documentation for specific classes?
Related Questions in MT4
- Dokka - skip generating javadoc for default android packages
- Dokka javadoc jar doesn't work with Intellij IDE
- How to document a primary constructor parameter with Kotlin Dokka
- How do you embed runnable sample code in Dokka generated documentation
- Dokka, Kotlin: How to get a DProperty's type? Or, in general, `DType` from `Bound`?
- Problem with dokka CLI - "Exiting Generation: Nothing to document"
- Problems setting up dokka in Maven
- Execution failed for task ':app:dokkaHtml'
- Linking JS stdlib to generated kdoc
- How can I suppress Dokka documentation for specific classes?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
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, wheniRSI() == 30%
?They are different, and a lot, aren't they?
That is the reason one can never say an actual
Close[i]
just from aniRSI()
-level.Q.E.D.