screener and array

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #156021 quote
    Robb
    Participant
    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

    #156024 quote
    Vonasi
    Moderator
    Master

    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.
    Insert-PRT-Code-Button.png Insert-PRT-Code-Button.png
    #156026 quote
    Vonasi
    Moderator
    Master

    You need to call your indicator with at least one parameter even if this is just CLOSE.

    #156029 quote
    Robb
    Participant
    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.

    #156030 quote
    Vonasi
    Moderator
    Master

    Try:

    myValue = CALL “myIndicator”[close]

    #156049 quote
    Robb
    Participant
    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

    #156054 quote
    Robb
    Participant
    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….

    #156071 quote
    Vonasi
    Moderator
    Master

    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.

    #156077 quote
    Robb
    Participant
    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

    #156095 quote
    Vonasi
    Moderator
    Master

    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.

    #156109 quote
    Robb
    Participant
    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….

    1. It would be possible to be informed as soon as the new development will be available?
    2. 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

    #156112 quote
    Robb
    Participant
    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

    #156127 quote
    Vonasi
    Moderator
    Master

    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

    1. I don’t work for PRT. I just help moderate these forums and offer assistance where I think I might be able to help so I have no way of informing you of progress. Nicolas gets regular info and updates from PRT so I am sure he will let everyone know as soon as ProScreener is improved or updated.
    2. To try to speed things up send reports and requests to PRT or use the suggestions topic in the ProRealTime Platform Support forum.
    3. Without the indicator code it is impossible to tell you how to adapt it so as to use standard variables and not arrays. I imagine that if it uses arrays that is so as to do something that is impossible without using them or to massively speed up an indicator that would take an eternity to calculate a result without them.
    #156129 quote
    Robb
    Participant
    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

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.

screener and array


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Robb @robb Participant
Summary

This topic contains 13 replies,
has 2 voices, and was last updated by Robb
5 years, 2 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 01/02/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...