Hello everyone,
I’m new here. Could anyone help please, how can I code, if I want to make a marker (for instance arrow) if the screener could find a defined setup?! I have two conditions in the code (c1 and c2). If these are met, I’d like to have an arrow up on the last bar of the setup.
Is it an ‘IF’ ‘THEN’ instruction?
Or ‘defparam’?
Sorry if this is a too simple question for the Pros!
Thank you so much!
A screener cannot display on charts, it only scans charts to check if your conditions are met or not.
You should use an indicator and add it over the price chart, not below, (in ProBuilder) to achieve your goals, like this one:
DEFPARAM CalculateOnLastBars = 200
offset = 10 * pipsize //distance from price to display ARROWs
if close < open then
DRAWARROWDOWN(barindex, high + offset) coloured(255,0,0)
elsif close > open then
DRAWARROWUP(barindex, low - offset) coloured(0,255,0)
endif
return
Here you can find further info and examples https://www.prorealcode.com/blog/learning/simple-indicators-dashboard/.
Roberto
Thank you Roberto, I’ll study.
Have a nice day!
Dear Roberto,
I’ve tried. But it always appears below the chart. What should I do that it will be in the chart?
Thanks
George
Add it on your price instead, use the wrench on the left upper side of the price chart.
Thanks Nicolas, make a try