# How to write the minimum of Stochastic

Forums ProRealTime English forum ProOrder support How to write the minimum of Stochastic

This topic contains 2 replies, has 2 voices, and was last updated by  Gianluca 10 months, 2 weeks ago.

View all attachments
Viewing 3 posts - 1 through 3 (of 3 total)
• #54918

Hi everybody, i would to implement inside a trading sistem a code that can find the bottom of an oscillator like RSI or the Stock, but i don’t know how. As you can see in the photo some times when the indicator cross the like could be too late to start a trade, so i would find a solution someone can help me?   i tried to write something like this, but is very rudimental:   ////PARAMETRIC1 = RSI[7](close)C2 = RSI[7](Dclose(2))d1 = c2 < 30d2= c1 > 35IF C1 CROSSES OVER 30 and d1 and d2 and not daysForbiddenEntry thenBUY PositionSize CONTRACT AT MARKETENDIF

###### Attachments:
#54935

I moved your post to the English forum. You cannot use a language different from that of the forum you choose.

I also modified the last word of your title Stoc in Stochastic, to make it clearer.

As for your question about highest and lowest values of the Stochastic or Rsi, you can only determine it hit a new minimun/maximum AFTER it’s passed, because whenever it sets a new maximum/minimun how can you foretell the next bar it will not go any higher/lower?

So, to determine the maximun/minimum of an oscillator you have to select the number of past bars you want to scan (10, 20, 30….?) and use HIGHEST/LOWEST to retrieve it. An alternative way is to use FOR…NEXT loops, but you won’t get better results and will slow down execution.

If you need to search documentation and tons of examples about any keyword or topic, you may want to use the search box that opens whenever your mouse hovers your avatar (upper right corner, in the blue menu bar).

Roberto

###### 2 users thanked author for this post.
#54955

Sorry 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or