Range of yesterday

Forums ProRealTime English forum ProOrder support Range of yesterday

Viewing 9 posts - 1 through 9 (of 9 total)
  • #126360

    Hello i need help to code in PRT

    I want to buy if todays price reeches 40% of yesterdays range added to todays open, and reverse for shorting

    take profit on 200% of yesterdays range (this is a swing system on 1-5 Days)

    Thanks alot!

    #126363

    I am highlighting broken rules, please abide by them. Thank you 🙂

    There are some simple rules that everyone using the forums is expected to follow. Your post has broken one or more of these rules

    The forum rules are as follows. I have HIGHLIGHTED in bold the rule/rules that you have not followed:

    • Post your topic in the correct forum:

         ProRealTime Platform Support  (only platform related issues)

         ProOrder                      (only strategy topics)

         ProBuilder                    (only indicator/oscillator topics)

         General Discussion            (any other trading related topics)

         Welcome New Members           (for new forum members to introduce themselves.

    • Only post in the language of the forum that you are posting in. English only in the English speaking forums and French only in the French speaking forums, etc…. for example.

    • Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read.

    • Do not double post. Ask your question only once and only in one forum once you have chosen your preferred language. All double posts will be deleted anyway so posting the same question multiple times (eben using

      different languages) will just be wasting your own (and moderators’) time and will not get you an answer any quicker. Double posting would imply spreading answers across multiple topics making it more difficult

      searching them.

    • Be careful when quoting others in your posts. Only use the quote option when you need to highlight a particular bit of text that you are referring to or to highlight that you are replying to a particular member if

      there are several involved in a conversation. Do not include large amounts of code in your quotes. Just highlight the text you want to quote and then click on ‘Quote’.

    • Do not post personal info (email address, website, home/office address, phone number, etc…). Should you need to contact someone or anyone interested in contacting shall use the contact form to ask Admin’s permit.

    • Be polite and courteous to others.

    • I have edited your post. Please ensure that your future posts meet these few simple forum rules.

    • Have fun. Thank you 🙂

     

    #126376

    There are some things that we just can’t do unless we have a crystal ball – such as know the opening price of the next candle! So we have to base our calculations on the closing price of the just closed candle because we do know that. If there is a big gap to the next open then you might be in trouble though.

    You are not totally clear on your take profit level – is it 200% from the buy price or 200% from the next candle open? I’ve coded it from the buy price below.

    Also because we are using pending orders which last for one bar and you want to go long and short there is the possibility that you can open a trade in one direction and then later in the same candle open one in the opposite direction which will close the first trade for a loss. You are better to run separate long and short strategies.

    You also need a stop loss!

     

    #126403

    hmm does it take yesterdays range or todays?
    if yesterday range was 100p todays daily bar opens if it goes upp 40p i want to buy and 40p below todays open i go short
    profit is 200p from where the trade is taken
    stoploss lets say 5%
     

    #126411

    Lohan – Did you read the simple forum rules?

    There are some simple rules that everyone using the forums is expected to follow. Your post has broken one or more of these rules.

    The forum rules are as follows. I have highlighted in bold the rule/rules that you have not followed:

    Post your topic in the correct forum.

    ProRealTime Platform Support          only platform related issues.
    ProOrder                                                only strategy topics.
    ProBuilder                                              only indicator topics.
    ProScreener                                           only screener topics
    General Discussion                               any other topics.
    Welcome New Members                      for new forum members to introduce themselves.

    Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.
    Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read.
    Do not double post. Ask your question only once and only in one forum. All double posts will be deleted anyway so posting the same question multiple times will just be wasting your own time and will not get you an answer any quicker. Double posting just creates confusion in the forums.
    Be careful when quoting others in your posts. Only use the quote option when you need to highlight a particular bit of text that you are referring to or to highlight that you are replying to a particular member if there are several involved in a conversation. Do not include large amounts of code in your quotes. Just highlight the text you want to quote and then click on ‘Quote’.
    Give your topic a meaningful title. Describe your question or your subject in your title. Do not use meaningless titles such as ‘Coding Help Needed’.
    Do not include personal information such as email addresses or telephone numbers in your posts. If you would like to contact another forum member directly outside of the forums then contact the forums administrator via ‘Contact Us’ and they will pass your details on to the member that you wish to contact.
    Always be polite and courteous to others.
    Have fun.

    I have edited your post where required. Please ensure that your future posts meet these few simple forum rules. 🙂

    #126414

    How can we know today’s range when today has not even happened yet at the open of today’s candle!

    ProOrder always runs through your code at the candle close and then places order on the next candle open. So at the time of candle close it is what you are considering as yesterday on a daily chart. Orders are placed at the open of the next candle or what you are calling today and the range calculations based on yesterdays range. As I said before – yesterday we cannot know what the open tomorrow is going to be or what the range tomorrow is going to be so we cannot base our calculations on something we don’t know. We have to assume that tomorrow the open will be at the same price as today’s close and today’s close we do know. There is of course the possibility that on a Monday morning the open will be much lower or much higher but without a crystal ball we cannot possibly know that at the close of Friday!

    #126424

    i  Think you are missunderstanding this.. you dont need to know todays range?

    You take yesterdays range, take 40% of that range as signal to entry from todays open so the market must first open Before we can calculate the entry price

    maybe PRT cant test this stratergy?

    #126426

    No – we cannot calculate it from the open. Code is read at the close of a candle and we don’t know the open then. I think I might have already said that a couple of times!

    You could use MTF and run in a much faster time frame to get as close to the opening price as possible but I don’t think I have the patience right now to get involved in trying to explain how to do that or explain all the disadvantages of doing that.

    #126434

    In actual fact the code I gave you is slightly wrong because it will keep recalculating the take profit level at each new day based on that days range. This stops that:

    The code does exactly what you asked for except calculate levels from the next days open because we don’t know it.

Viewing 9 posts - 1 through 9 (of 9 total)

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