Early entry using anglefunction
Forums › ProRealTime English forum › ProOrder support › Early entry using anglefunction
- This topic has 7 replies, 3 voices, and was last updated 2 weeks ago by
Trepur.
-
-
05/22/2025 at 4:31 PM #247519
Hello,
I’ve only been using ProRealTime for a few days and am therefore not yet familiar with the programming. Since I would like to test a (possibly) own trading approach, I’m asking for help with the programming.
My idea: A relatively early entry signal is provided by the MACD signal line crossing, i.e., when the tangent of the blue and red lines becomes positive (relative to the first quadrant of the unit circle) and the blue line crosses the red line. The stochastics also provides a similar signal. So:
Condition 1: the tangent of the blue MACD line is/turns positive!
Condition 2: the tangent of the red signal line is/turns positive!
Condition 3: the blue MACD line crosses the red signal line!
The fourth, fifth, sixth, and seventh signals are provided by the stochastics indicator. This indicator must also have a positive tangent and should be above 20, but not more than 25 to 30. So:
Condition 4: The tangent of the stochastic %K line is/turns positive!
Condition 5: The tangent of the stochastic %D line is/turns positive!
Condition 6: The stochastic %K line has crossed the stochastic %D line!
Condition 7: The stochastic indicator is greater than 20 but smaller than 30!
All conditions must be met!
If such an approach has been programmed before, please let me know where it can be found in the program file.
Best regards
05/22/2025 at 4:48 PM #247522Please attach a pic showing those tangents.
05/22/2025 at 4:52 PM #247524Please:
- post your topic in the correct forum (ProOrder, as it’s a stgrategy)
- speak the language of the chiosen forum.
I moved your question from the German ProScreener support.
05/22/2025 at 7:52 PM #24752605/26/2025 at 8:36 AM #247593Hi. Here you have an example:
1234567891011121314151617181920212223242526272829// --- INDICATOR PARAMETERS ---mimacdLine = MACDline[12,26,9](close)signalLine = MACDsignal[12,26,9](close)stochK = Stochastic[14,3](close)stochD = average[3](stochK)// --- SLOPE CALCULATIONS (DIFFERENCES) ---macdLineSlope = mimacdLine - mimacdLine[1]signalLineSlope = signalLine - signalLine[1]stochKSlope = stochK - stochK[1]stochDSlope = stochD - stochD[1]// --- MACD CONDITIONS ---cond1 = macdLineSlope > 0 // MACD line slope is positivecond2 = signalLineSlope > 0 // Signal line slope is positivecond3 = mimacdLine CROSSES OVER signalLine // MACD line crosses above signal line// --- STOCHASTIC CONDITIONS ---cond4 = stochKSlope > 0 // Stochastic %K slope is positivecond5 = stochDSlope > 0 // Stochastic %D slope is positivecond6 = stochK CROSSES OVER stochD // Stochastic %K crosses above %Dcond7 = stochK > 20 AND stochK < 30 // Stochastic %K is between 20 and 30// --- GLOBAL CONDITION ---allConditions = cond1 AND cond2 AND cond3 AND cond4 AND cond5 AND cond6 AND cond7RETURN allConditions05/26/2025 at 9:09 AM #247597Hi Ivan,
thanks a lot for your help!
Nevertheless, the program doesn’t run, due to a warning in row “29”. As I have noticed in another program, I was told, that each program has to be ended with a row containing “screener”. Could that be the reason?
Best regards
Rupert
05/26/2025 at 9:29 AM #247599Sorry, there was a misunderstanding…
Here you have the screener:1234567891011121314151617181920212223242526272829// --- INDICATOR PARAMETERS ---mimacdLine = MACDline[12,26,9](close)signalLine = MACDsignal[12,26,9](close)stochK = Stochastic[14,3](close)stochD = average[3](stochK)// --- SLOPE CALCULATIONS (DIFFERENCES) ---macdLineSlope = mimacdLine - mimacdLine[1]signalLineSlope = signalLine - signalLine[1]stochKSlope = stochK - stochK[1]stochDSlope = stochD - stochD[1]// --- MACD CONDITIONS ---cond1 = macdLineSlope > 0 // MACD line slope is positivecond2 = signalLineSlope > 0 // Signal line slope is positivecond3 = mimacdLine CROSSES OVER signalLine // MACD line crosses above signal line// --- STOCHASTIC CONDITIONS ---cond4 = stochKSlope > 0 // Stochastic %K slope is positivecond5 = stochDSlope > 0 // Stochastic %D slope is positivecond6 = stochK CROSSES OVER stochD // Stochastic %K crosses above %Dcond7 = stochK > 20 AND stochK < 30 // Stochastic %K is between 20 and 30// --- GLOBAL CONDITION ---allConditions = cond1 AND cond2 AND cond3 AND cond4 AND cond5 AND cond6 AND cond7screener[allConditions]1 user thanked author for this post.
05/26/2025 at 9:39 AM #247601 -
AuthorPosts
Find exclusive trading pro-tools on