RobbParticipant
Average
Hello,
I built an indicator that return one value only, such as a price level.
This indicator has several arrays in it.
Then I called this indicator in a new screener, in this way:
myValue = CALL "myIndicator" //(myIndicator hasn't got any parameter)
ind = myValue > lowest[20](low) //(of course this is only a test in order to be sure I'll get some results)
screener[ind]
Unfortunately I don’t get any results, although I know there are.
In my opinion, there’s something does not work properly in the function CALL…And I think this is because in myIndicator there are some arrays, and Prorealtime is not able to deal with them with a screener, yet.
Can anyone help me on that, and tell me if my feeling is correct or not.
Thank you
Roberto
Robb – I tidied up your post.
- Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read.
You need to call your indicator with at least one parameter even if this is just CLOSE.
RobbParticipant
Average
Hello Vonasi,
Thanks for tiding up my post.
Unfortunately I don’t get your point. I have other CALL instructions, I made some tests. They work without any parameter (because the indicator doesn’t have any) and without any (close) at the end the function CALL (if this is what you refer to).
My indicator is quite complex and I don’t want to paste it in this post. But the outcome from the return function is just a price level (just imagine a resistance or support level).
So please could you explain me better your answer.
Try:
myValue = CALL “myIndicator”[close]
RobbParticipant
Average
I got a message error saying
“The function “myIndicator” recall in “myScreener” is called with 1 parameter instead of zero foreseen.
I put myValue = CALL “myIndicator”[close] as you suggested, but since myIndicator does not have any parameter, it does not work again.
Any suggestion?
thank you
RobbParticipant
Average
I tried to copy&paste in the screener the entire indicator code too, avoiding the call function, but some errors come out when the program meet the arrays in the code.
That’s why I suppose the problem is related to the array in the code….
Sorry – I deleted my last post as Roberto pointed out a typo on the screener line so the test and workaround was invalid. It seems that it is not possible to call an indicator which includes arrays from a screener. That seems odd as although they are different engines I’d have thought that a returned value from ProBuilder was a returned value whether it came via arrays or not.
RobbParticipant
Average
Yes it seems so, also because in myIndicator code, the return value was already a variable and not the array itself (at a certain point there’s the association x = $myarray etc … return x).
So Vonasi, there’s a bug in the software? Any possibility to work it out?
thanks
There is no workaround I’m afraid. It is an incompatibility issue between the ProScreener engine and the ProBuilder engine. I believe there are plans in the pipeline to update ProScreener to bring it more in line with ProBuilder and ProOrder – so we will just have to wait for that before being able to access arrays via it.
RobbParticipant
Average
thank you for the support, unfortunately this is a very sad news and I am also very disappointed to know that after spending many hours in coding my indicator….
- It would be possible to be informed as soon as the new development will be available?
- Are there any ways to speed it up?
And now, what do you suggest, to modify the indicator code and replace the arrays with standard instructions?
Regards
RobbParticipant
Average
Hello Vonasi
maybe you can help me again, because I am pretty sure there should be a standard routine for having the same behaviour of an array.
Let’s imagine I have 3 variables: A, B and C. Based on a certain condition, when met, I store the value (eg the close) in A.
When A, B and C are full, I start again with A and so forth.
Hope it’s clear.
thanks
RobbParticipant
Average
…In the meantime I found a way to avoid arrays using standard commands, and the results, at least for the screener scope, is acceptable for me.
thanks again for your prompt answers
bye