CalculateOnLastBars

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #115681 quote
    icharttop
    Participant
    Junior

    How can l calculate my close in [13] bars example: close price 1,451.30 – close in [50] bars 1,460.16

    MyNextLow = Lowest [13] (close)
    
    For ii = 13 downto 0 do
    if low [ii] = W2 then
    W2 = ii
    drawtext(#W2#,barindex[ii],low[ii])
    endif
    
    next

     

    Now l need to calculate my [13] close price 1,451.30  – [50] 1,460.16 = 8.86

    #115683 quote
    Vonasi
    Moderator
    Master

    icharttop – Please use the ‘Insert PRT Code’ button when posting code. I have tidied up your post for you 🙂

    I don’t understand your question – so I’m afraid I can’t help with that at the moment!

    #115687 quote
    icharttop
    Participant
    Junior

    l want to know my closing price of  W2 = 1,451.30 so l can use to calculate W2 closing price to my next closing price ex – or  + = can l use

    MyNextLow = lowest [13] (close)
    for ii = 13 downto 0 do  //do the ations below
    if low [ii] = W2 then
    W2 = ii
    drawtext(#W2#,barindex[ii]) // draw W2 on the lowest low on my barindex or chart in [13] bars
    endif
    next
    Defparam CalculateOnLastBar = [13] low close // need to calculate W2 closing price then need to calculate the next [50] bars close
    #115689 quote
    Vonasi
    Moderator
    Master

    I still don’t understand what you are trying to achieve but there are a number of coding errors I notice and that also make it difficult to understand what you are trying to do.

    DEFPARAM must always be at the beginning of a code.

    CALCULATEONLASTBAR is missing an S at the end.

    DEFPARAM CALCULATEONLASTBARS cannot be followed by [13] low close. It must be a simple integer value.

    for ii = 13 downto 0 do looks at 14 bars including the current still forming bar and not the last 13.

    You define MyNextLow but never use it in the code.

    icharttop thanked this post
    #115695 quote
    icharttop
    Participant
    Junior

    Thank you for your help but l never coded before if you need a house built l can build it with my eyes closed. This is my first coding l have done but what l trying to achieve on my coding it has never been done before counting waves Wave 1> Wave 2< Wave 3> Wave 4< Wave 5 Target Price Correction, and that is even harder to achieve

    #115701 quote
    Vonasi
    Moderator
    Master

    Thanks for the offer but I’m not in need of a house right now. I’ll be in touch if I ever get fed up with living on a sailing boat in the sun though.

    You’ll need to give a better description of what you are trying to achieve with maybe some attached screenshots with some doodles on. Trying to code for waves seems like quite an ambitious first coding project.

    icharttop thanked this post
    #115709 quote
    icharttop
    Participant
    Junior

    Thanks for you honest opinion but l had a app builder to make a app for me and they had to code my system to make it work. so l know that my wave system work on coding. here are some screenshots of my app on youtube https://www.youtube.com/watch?v=s0porXPjV5I

    https://www.youtube.com/watch?v=8T-yLAR1ZHw

    #115710 quote
    icharttop
    Participant
    Junior

    it’s all ok all l need to do is to trade a simple coding buy <low [13] buy 1 contact,  buy <low [50] buy 1 contact, buy <low [50] sell all 3 contact at target price with MultiCharts and MT4 with Andrea Unger not igmarkets

    #115711 quote
    robertogozzi
    Moderator
    Master

    MultiCharts, like any different trading platform has a proprietary programming language and can’t use PRT’s (I think it uses Easy Language).

    We cannot deal with it. You may try requesting paid programming services, they might help you.

    x.jpg x.jpg
    #115713 quote
    icharttop
    Participant
    Junior

    Hi Roberto l have tryed to contact you on your website for coding, you did not give me a reply

    #115714 quote
    robertogozzi
    Moderator
    Master

    taqaro?

    I replied on Dec. 26th.

    But I suggest that you use the programming services. Thank you 🙂

    #115715 quote
    icharttop
    Participant
    Junior

    l contacted Nicolas for programming services.

    #115716 quote
    robertogozzi
    Moderator
    Master

    Do not post contact info and private messages. Thank you. 🙂

    I will try to resend you my reply. Make sure it’s not thrown in the trash bin or considered spam.

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

CalculateOnLastBars


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
icharttop @icharttop Participant
Summary

This topic contains 12 replies,
has 3 voices, and was last updated by robertogozzi
6 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/01/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...