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
Please attach a pic showing those tangents.
Please:
- 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.
Sorry for using the wrong forum!
Attached, please find the file, where I filled in the 4 tangents, which I mentioned in my previous post. I hope I could clarify my intention, and the copy of the chart has well arrived.
Best regards
Hi. Here you have an example:
// --- 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 positive
cond2 = signalLineSlope > 0 // Signal line slope is positive
cond3 = mimacdLine CROSSES OVER signalLine // MACD line crosses above signal line
// --- STOCHASTIC CONDITIONS ---
cond4 = stochKSlope > 0 // Stochastic %K slope is positive
cond5 = stochDSlope > 0 // Stochastic %D slope is positive
cond6 = stochK CROSSES OVER stochD // Stochastic %K crosses above %D
cond7 = 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 cond7
RETURN allConditions
Hi 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
Sorry, there was a misunderstanding…
Here you have the screener:
// --- 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 positive
cond2 = signalLineSlope > 0 // Signal line slope is positive
cond3 = mimacdLine CROSSES OVER signalLine // MACD line crosses above signal line
// --- STOCHASTIC CONDITIONS ---
cond4 = stochKSlope > 0 // Stochastic %K slope is positive
cond5 = stochDSlope > 0 // Stochastic %D slope is positive
cond6 = stochK CROSSES OVER stochD // Stochastic %K crosses above %D
cond7 = 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 cond7
screener[allConditions]
Hi Ivan,
it works!
Thanks once again for your help. Hope this will encourage me to get some more knowledge in programming this tool 😉
Regards Rupert