Hi again,
i followed one of the tutorial but missing something basic.
look at code below. regarding ‘signal = 0‘, i dont want to display it in the charge as it distorted it. i am only intresed in the ‘signal = low‘ to b displayed on chart. how can i handle it?
smaShort = average [short]
smaLong = average [long]
sto = Stochastic[14,3](close)
if smaShort > smaLong then
if sto crosses over 20 then
signal = low
else
signal = 0
endif
endif
return signal
Try this one (not tested):
smaShort = average [short]
smaLong = average [long]
sto = Stochastic[14,3](close)
signal = low
Once t = 0
if smaShort > smaLong then
if sto crosses over 20 then
t = 255
else
t = 1
endif
endif
return signal coloured(“Green”,t)
thank you for the speedy answer.
so i dont understand how it worked for the person that did the tutrial : ‘Example program 2 – Trading system with target and stop’
Hi again,
is there away for me to say if statement is true return value A, but if its false dont return anything.
ONCE means it only return once.
i want to mark on chart only when all conditions are met.
thanks
It’s not possible to return NOTHING. If a variable is set it returns the retained value, no matter if it had been assigned bars before or in the current bar. If it’s cleared (assigned 0), it will return 0.
That’s why your indicator, like Macd, Rsi etc… will not display correctly when added ON the chart. The returned value is on a different scale than the price. On a DAX chart the price is about 15000 while your indicator returns 0 or 1. If you make the chart be displayed normally you won’t see your indicator, if you shrink your chart to see your indicator, the price bars will appear as a straight line.
In order to not get a distorted chart because using values off scale, change the scale option of the Y axis (see attached picture).
This is beating around the bush. The fact that we can’t “switch off” an indicator is highly annoying.
On another note : I don’t think I am using any shortcuts for any of the many functions in PRT, but I want one : for Vertical Resizing – Use Price only – as I am using this x times per day. But we can’t assign a shortcut to that as far as I know.
Or allow it to don’t show anything when I decide so, like Lady Y asks.
can’t “switch off” an indicator is highly annoying.
If on Prie Chart then you can ‘hide’ an Indicator by right click > hide.
we can’t assign a shortcut to that as far as I know. Or allow it to don’t show anything when I decide so, like Lady Y asks.
Have you Suggested it to PRT direct using the form on the link below?
https://www.prorealtime.com/en/contact
Click on Suggestion Box on the left under the photo (I know you know Peter, but others may not).
If on Prie Chart then you can ‘hide’ an Indicator by right click > hide.
Above should correctly have read … left click > hide (after pointing at the Indicator) … see attached at red arrowhead.