array variables availability in ProRealTime – examples and discussions

Forums ProRealTime English forum ProBuilder support array variables availability in ProRealTime – examples and discussions

Currently, there are 1 user and 4 guests visiting this topic.
View all attachments
Viewing 15 posts - 91 through 105 (of 105 total)
  • #132843 Report

    As usual double posting just leads to confusion and wasted time which is why it is a forum rule not to double post. So far Nole djole you have broken two forum rules in just four posts as well as spamming the forums with requests for Nicolas to contact you. If you have a question then post it as a topic in the (correct) forum and perhaps someone will help you. If you want to use Nicolas’ professional programming services then follow the instructions  under ‘Help’ and then pay him for the use of his professional programming services.

    This topic is about arrays…. now do you have a question about arrays? If not then stop posting here or in any other topic where your post is not relevant!

    #135032 Report

    Hello,

    Do array variables work with Proscreener?

    I have errors as soon as I put a table in my screener …

    Thank you

    Strade

    #135071 Report

    Arrays are not yet supported by ProScreener.

    #135077 Report

    ok thank you, it’s a shame!

    #139931 Report

    Hi everybody !

    I have just discovered  that the MTF indicators have been available for some time ago and I am very happy with this opportunity.

    DEAR NICOLAS,
    I’d like to have more explanations if possible.

    Before getting there, I have here 2 examples which, if they are in line with the MTF, associated with the array variables, this would mean that I have understood the process.

    Another thing, can you please give us other simple examples as you promised? With everyday indicators like STO, RSI MM and so on…

    That’s why I’m here to ask for some help for a better understanding in this code.

    I propose 2 situations to be examined one after other.

    The first :

    IS IT POSSIBLE TO CODE THIS WITH ARRAY VARIABLES AND MTF INDICATORS, BECAUSE WE ENTER IN CODING THE FUTURE (Anticipation over 3 periods ahead):

    I want to take a bullish position on  H4 Timeframe. Here the duration of my operation will be from 4 hours to 2 or 3 days. (Deadline that I set myself on this horizon of the forecast)

    I would like to make sure on  Daily TF that during this period of time, (that is to say over the next 2 to 5 days, including then my 3 days max on H4 TF) the trend will remain bullish, despite a decline towards the MA.

    For this, I have a 20-days MA and a 7-days MA. In manual trading, the projection is visual. I want to check and will only take a position only if, during the coming days, the added closes (therefore anticipation, this is  a bit in the future) are systematically greater than the close [8] and following 7, 6,  and close [21] and following 20, 19, 18. (Otherwise we can do the analysis with the current close) The close can be estimated by using the other indicators (or the previous close, or the current close)

    If this is verified over at least 3 days, ie that the closes and the 7-days average have ended their decline on the 20-days MA which has remained bullish; then on H4 TF I will take a position when the average  28 hours (4 hours x 7) has crossed the average 80 hours (= 4 hours x 20). Or, better, I’ll use the STO, confirmed by MACD.

    In fact, The problem is, in Daily TF, to code thess formulas for the 7-days MA and also the 20-days MA: (MAshort, MAlong)

    MAsh [2] = MAsh [3] + ((close-close [8]) / 7).

    And for the MA 20 :

    MAlg [2] = MAlg [3] + ((close-close [21]) / 20)

    If I assume that the  ratio ((close-close [8]) / 7), (= Δ) (Delta)

    (The MA of the following period (MA [2]) is equal to the MA [3] of the previous period to which we add delta, given that for a MA with 7 periods, to MA of the following period will be added the 8th close and withdraw the 1st close)

    Delta means that at the withdrawn close we subtract the added close and divide this difference by the period of the MA.
    As long as delta is> 0 and increasing in absolute value, the MA7 will progress; if delta is<0 and increasing in absolute value, the MA7 will decrease.

    But above all, this analysis allows me to anticipate a crossing or a non-crossing or tightening of MAs. So,  I have to make sure that over at least 3 days of my trade the trend on the upper TF will be bullish.

    THANK YOU TO TAKE A LOOK AT THIS.

    I 'll tell about the second exemple in the future, after this... And I'm going to present tomorrow or after tomorrow the code I've tried to make up...

    In your second example « probality Cone » I’ve seen that it is an anticipation. Can you explain this strategy please and the role of the cone ? This will  undoubtedly help in a better understanding.

    THANKS AND BEST REGARDS

    GENTRY.

    #142535 Report

    will it be possible to make a table of datas from all the stocks in a index and store them in an (or multiple) arrays to work with them in EXCEL ™ ?

    I would like for example for each value of the CAC 40 to get the value on the 24/02/2020 and compare its value on 15/03/2020 to see which values are ahead both market and which one are late.

    For now we can only have a graphic comparison with another value but we have to load each graphic one by one… which take quite a long time…

    Proscreener returns only one column and 100 value max which is not enough for large markets (S & P = 500 values to store)

    The solution will to scan all the values, get what we’re looking for (Open, close, range, Moving average, standard error…) and store them in an array. When all the values are stored in the array saving it to work with excel or another spreadsheet. Do you think that array var will go that far ??

     

    Best Regards

    Lorenzo15

    #142541 Report

    Sorry but there are 2 limitations here: you can’t get other instrument price than the one you are actually looking at… and you can’t export files outside of the platform.

    #144665 Report
    gfx

    Hi,

    below two version of same code, on with and the other wo arrays.

    The second one doesn’t draw the text as expected. Any idea ?

    Thks.

    above working ok.

    Below not working

    #144666 Report
    gfx

    this works though. Any reason ?

     

    #144670 Report

    Indeed, because an unspecified array variable is always worth zero, one cannot thus know if the value stored inside is a value either false, or true, or NaN.

    #145978 Report

    Hello,

    I’m not sure if this falls within the scope of arrays, but…

    the idea is to draw vertical lines at different times of the past trading session.

    I populate manually the array with Times ; each value of the array will bring a vertical line on the graph.

    When the indicator runs, if any value within the array matches the Time of the bar, a vertical line is drawn.

    The code below doesn’t work, but might give you an idea of what I’m looking for.

    The graph shows what the result is expected to be.

    Thanks for your assistance

     

    .

    Attachments:
    #145985 Report

    On each candle the loop will fetch into the array to know if the current time of the candle is present or not:

     

    #145986 Report

    Works fine ; many thanks Nicolas

    #147961 Report

    Just a single question, please: arrays are supported for backtesting? (involving some indicator using them) Thanks.

    #147973 Report

    Yes they are. There is only ProScreener which cannot handle them. The screener module will be re-factorized (ProScreener v2) next year.

Viewing 15 posts - 91 through 105 (of 105 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login