Monday morning on day

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #59464 quote
    bluetime6
    Participant
    Average

    Is it possible to display the exact course of the last 100 mondays at 09.00 o´clock in the morning for example in the form of a graph? If so, in best case can we use the tick data? And how far does the tick data go back to PRT for a backtest?

     

    kind regards

    #59468 quote
    verdi55
    Participant
    Veteran

    You do not need tick data.

    If dayofweek = 1 and Time = 090000 then
    close090000 = close
    endif
    
    return close090000 as "Kurs Montag 9:00"

    In a 1h or 4h chart, this may go back up to 10 years, I think.

    close090000 does not yield the opening price at 9:00, but the last closing price the tick before. Both will be almost identical in most cases.

    #59469 quote
    bluetime6
    Participant
    Average

     

     

    Hallo und Vielen Dank.

    Derselbe Code gilt dann wohl auch für den Schlusskurs Montag 10.00 Uhr – korrekt?

    Wenn ja, kann ich mir die Differenz der Schlusskurse in einem über/unter Null Graph anzeigen lassen?

    #59470 quote
    verdi55
    Participant
    Veteran

    Sorry, I don’t know much about histograms. You may want to consider the programming manual.

    And : this is an English forum, please. We speak German in the German forum.

    #59471 quote
    verdi55
    Participant
    Veteran

    to graph the difference as a line only :

    If dayofweek = 1 then
    If Time = 090000 then
    close090000 = close
    endif
    If Time = 100000 then
    close100000 = close
    endif
    endif
    
    If TIME >= 100000 then
    diff = close100000 - close090000 
    endif
     
    return diff as "Differenz Kurs 10:00 - Kurs 9:00"

    You can change this in the chart manually to a histogram, I think, or look it up in the manual how to code this.

    #59475 quote
    bluetime6
    Participant
    Average

    So let’s give it a shot.

    Due to the historical prices of Monday 9 a. m.  I want to take a position which corresponds to the average development of the last 1000 assembly, for example.

    If it is possible to reproduce this in PRT, you can reproduce it for all other time periods, e. g. Tuesday 11:00.

    And more precisely:
    When I open a long position with this code on Monday 9:00 a. m., I can “see” that this position is growing due to the historical data.
    I would like to use this indicator to determine whether the opening of the position is “worthwhile” under these conditions.

     

    Do you understand everything? Did I put it right?

     

    kind

     

     

    Translated with http://www.DeepL.com/Translator

     

    //-------------------------------------------------------------------------
    // maincode : Monday Morning om Dax
    // created by bluetime
    //-------------------------------------------------------------------------
    
    
    
    once Position = 1
    
    
    c1 = Opendayofweek = 1
    c2 = time = 090000
    c3 = close> open
    
    
    
    IF  c1 and c2 and c3 Then
    buy Position contract at market
    Endif
    
    
    Set Stop pLoss 40
    Set target pprofit 40
    #59477 quote
    bluetime6
    Participant
    Average

    addendum

    So I want to know nothing more than whether opening a position on the basis of historical data is worthwhile at this point in time. With a fixed SL and TP or by closing the position at a certain time.

    Because i open a postion with the same code on tuesday 09.00 the result ist this

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

Monday morning on day


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
bluetime6 @bluetime6 Participant
Summary

This topic contains 6 replies,
has 2 voices, and was last updated by bluetime6
8 years ago.

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