Hello,
When the conditions of a Screener are met is it possible to add some code which would show a symbol on the chart confirming the event.
Any sort of symbol would be good. This is similar to the arrows which show on the chart when an Alert is triggered.
Any advice would be appreciated
No, it’s not possible.
Screeners can only highlight new instruments in a list and beep.
OK, many thanks for clarifying that.
You could set up the same conditions on a Chart / Indicators and then use the symbol you can set up when an Alert is triggered (see red arrowhead on attached).
Many thanks for the Chart/Indicator suggestion which never occurred to me.
I’ll give this a go and submit my feedback
I’ve set up the Screener as an Indicator which works correctly showing 1 = TRUE and 0 = FALSE but I’m not sure how I can set this up to show as a symbol on the main chart.
Any advice appreciated
//TRADE ENTRY INDICATOR
//HEIKEN ASHI CALCULATION
xClose = (Open+High+Low+Close)/4 //Heikin Ashi Close price
if(barindex>2) then
xOpen = (xOpen[1] + xClose[1])/2 //Heikin Ashi Open price
endif
indicator1 = SAR[0.02,0.02,0.2] //Parabolic SAR
sto = Stochastic[14,3](close) //Stochastic %K
signal = average[5](sto) //Stochastic %D
c3 = indicator1 < close //Parabolic SAR below Close
c4 = indicator1 > close //Parabolic SAR above Close
c5 = sto > signal //%K above %D
c6 = sto < signal //%K below %D
c7 = xClose>xOpen //Green Haiken Ashi candle
c8 = xClose<xOpen //Red Haiken Ashi candle
TradeEntry = (c3 AND c5 AND c7) OR (c4 AND c6 AND c8)
Return TradeEntry
For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! 🙂
Try this, if it’s what you want:
//TRADE ENTRY INDICATOR
//HEIKEN ASHI CALCULATION
xClose = (Open+High+Low+Close)/4 //Heikin Ashi Close price
if(barindex>2) then
xOpen = (xOpen[1] + xClose[1])/2 //Heikin Ashi Open price
endif
indicator1 = SAR[0.02,0.02,0.2] //Parabolic SAR
sto = Stochastic[14,3](close) //Stochastic %K
signal = average[5](sto) //Stochastic %D
c3 = indicator1 < close //Parabolic SAR below Close
c4 = indicator1 > close //Parabolic SAR above Close
c5 = sto > signal //%K above %D
c6 = sto < signal //%K below %D
c7 = xClose>xOpen //Green Haiken Ashi candle
c8 = xClose<xOpen //Red Haiken Ashi candle
TradeEntry = (c3 AND c5 AND c7) OR (c4 AND c6 AND c8)
IF TradeEntry THEN
DRAWTEXT("█",barindex,low - 20*pipsize) coloured(238,238,0,255)
ENDIF
Return
Many thanks. Now I understand the code I can format it to my requirements