Trade in einem Zeitfenster starten

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #223537 quote
    f1_maik
    Participant
    Junior

    Hallo Ihr Lieben.

    Ich möchte einen Handel in eimem Zeitfenster starten, sagen wir  der Handel soll zwischen Montag 15.30 Uhr und Dienstag 19.00 Uhr starten.

    Ich möchte dabei Kaufen wenn der Kurs vom Close am Montag um 15.30 Uhr um 1% gefallen ist.

    Ich habe es jetzt so, aber er macht es nicht……

    Kann jemand helfen?

     

    
    defparam cumulateorders = false
    
    if opendayofweek = 1 and time = 153000 then
    Kauf = close - close/100*1
    endif
    
    timec1 = opendayofweek >= 1 and time >= 153000
    timec2 = opendayofweek <= 2 and time <= 193000
    
    If time >= timec1 and time <= timec2 then
    buy at Kauf limit
    endif
    
    set stop %loss 1
    set target %profit 1
    #223547 quote
    robertogozzi
    Moderator
    Master

    Die Bedingungen für die Eröffnung einer Position müssen geändert werden:

    defparam cumulateorders = false
    
    if opendayofweek = 1 and time = 153000 then
       Kauf = close - close/100*1
    endif
    
    timec1 = (opendayofweek = 1 and time >= 153000) or (opendayofweek > 1)
    timec2 = (opendayofweek < 2) or (opendayofweek = 2 and time <= 193000)
    
    If timec1 and timec2 then
       buy at Kauf limit
    endif
    
    set stop %loss 1
    set target %profit 1
    f1_maik thanked this post
    #223559 quote
    phoentzs
    Participant
    Master

    Das System 1% per Week? Kommt mir bekannt vor. 😉

    #223572 quote
    f1_maik
    Participant
    Junior

    Ja dort geht es hin…

    #223573 quote
    f1_maik
    Participant
    Junior

    Hallo Roberto

    ganz großen Dank!!

    Nun gehts weiter. Das System verlangt einen weiteren Punkt.

    Sollte der Kurs seit Montag 15.30 Uhr um 1,5% gefallen sein, soll der TakeProfit auf Einstand gesetzt werden

    Ich habe hier von dir in den Foren das gefunden, vgl

    Dax Breakout – Need some assistance please

    und dort genauer dann das hier

    if (longOnMarket and (close - tradePrice) >= 15 * pointSize) OR (shortOnMarket and (tradePrice - close) >= 15 * pointSize) then
    set Stop Breakeven
    endif

    und es so umfunktioniert…. doch es klappt nicht
    Kannst du bitte noch mal helfen?

    defparam cumulateorders = false
    
    if opendayofweek = 1 and time = 153000 then
    Kauf        = close - close/100*1
    AnpassungTP = close - close/100*1.5
    endif
    
    timec1 = (opendayofweek = 1 and time >= 153000) or (opendayofweek > 1)
    timec2 = (opendayofweek < 2) or (opendayofweek = 2 and time <= 210000)
    
    If timec1 and timec2 then
    buy at Kauf limit
    set target %profit 1
    endif
    
    if longOnMarket and (close - tradePrice) =< AnpassungTP then
    set Stop Breakeven
    endif
    
    #223585 quote
    phoentzs
    Participant
    Master

    Ich glaube, es ist eher so gedacht, dass wenn der Kurs zu tief sinkt, das der Takeprofit auf Breakeven gesetzt wird. Ich denke das macht eher Sinn.

    f1_maik thanked this post
    #223600 quote
    f1_maik
    Participant
    Junior

    Ja, so ist gedacht, aber meine Kenntnisse reichen nicht aus, das hinein zu programmieren, kannst du es?

    #223601 quote
    phoentzs
    Participant
    Master

    Ich bin momentan unterwegs…
    Versuch mal in Zeile 17 statt der Breakevenanweisung:

    Set Target Price Kauf

    f1_maik thanked this post
    #223602 quote
    f1_maik
    Participant
    Junior

    Ja, das klappt.
    Ich habe noch den TimeStop Freitag abend nach Vorgabe der Quelle und einen SL ein bisschen nach Drawdown (geringster) optimiert hinzugefügt.
    Der Code sieht so aus.

    
    defparam cumulateorders = false
     
    If opendayofweek = 1 and time = 153000 then
    Kauf        = close - close/100*1
    AnpassungTP = close - close/100*1.5
    Endif
     
    timec1 = (opendayofweek = 1 and time >= 153000) or (opendayofweek > 1)
    timec2 = (opendayofweek < 2) or (opendayofweek = 2 and time <= 210000)
     
    If timec1 and timec2 then
    buy at Kauf limit
    set target %profit 1
    Endif
     
    If longOnMarket and (close - tradePrice) =< AnpassungTP then
    set target profit Kauf
    Endif
    
    If longonmarket and opendayofweek = 5 and time = 220000 then
    sell at market
    Endif
    
    set stop %loss 4

    Damit hätten wir ein fertiges System im 30 Minuten Chart.
    Hinzgefügt werden müßte die Quelle der Idee (soweit ich es verfolgen konnte) .. Dion Kurczek – dem Gründer von Wealth-Lab.com, veröffentlich in der Zeitschrift “Traders” Ausgabe 03/2023
    Wo ich es gefunden habe .. https://system-check.me/1-prozent-pro-woche/. Handelbar sollen NAS100 und S&P500 sein.

    Optimiert werden könnte das Zeitfenster des Einstieges, hier willkürlich gewählt, also irgendwo zwischen Montags ab 08.00 Uhr bis Freitag 20.00 Uhr oder auch alle Prozentangaben. Zusätzliche Filter könnten auch etwas bringen.

    Wenn gewünscht, ab in die Bibliothek damit…

    #223608 quote
    phoentzs
    Participant
    Master

    Sieht sehr gut aus. Ich kenne das System, bin aber nie dazu gekommen es zu programmieren.

    #223797 quote
    axmichi
    Participant
    Senior

    Hi, laut System soll doch nur Montag gekauft werden, daher verstehe ich nicht Zeile 8 und 9

    ?? LG

    #223807 quote
    axmichi
    Participant
    Senior

    Hallo noch ne Frage zum System, bei mir kommen  da mehrere Orders soll das so sein.

     

    Hier meine Frage zum Code. Es wird leider keine Order ausgelöst??

    if dayofweek = 1 and time = 080000 then
    myprice=close

    endif

    if not long onmarket and Dayofweek = 1 and close <= myprise * 0.99 then

    buy at 1 limit

    #223886 quote
    f1_maik
    Participant
    Junior

    Zeile 8 legt ab wann gekauft werden darf, hier Montag ab 15.30 Uhr mit der Eröffnung der US-Börse europe time, berlin
    Zeile 9 legt fest bis wann gekauft werden darf, hier Dienstag 21.00 Uhr, wieder europe time, berlin

    #223981 quote
    axmichi
    Participant
    Senior

    Das system kauft ja mit Limit wenn der Kurs tiefer als 1 %, das verstehe ich. Wie muss es aber heißen wenn man jetzt sagen würde. Es soll nachdem das Limit gerissen wurde nicht gleich kauf (am Limit) sondern erst wenn der Kurs es wieder über das Limit geschafft hat und dort eine Kerze macht, bei der der Close größer ist als das Open?

     

    Also der Kurs sticht nur kurz, oder schließt unter der 1 % Schwelle und schafft es dann aber irgendwann wieder rüber und schließt mit einer Gewinnkerze? dann Einstieg

     

    Weißt Du wie das im Code heißen muss??

     

    LG

    #223985 quote
    phoentzs
    Participant
    Master

    close crosses over…

    Wäre wohl das Einfachste.

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

Trade in einem Zeitfenster starten


ProOrder: Automatischer Handel & Backtesting

New Reply
Author
author-avatar
f1_maik @f1_maik Participant
Summary

This topic contains 15 replies,
has 4 voices, and was last updated by axmichi
2 years, 2 months ago.

Topic Details
Forum: ProOrder: Automatischer Handel & Backtesting
Language: German
Started: 11/11/2023
Status: Active
Attachments: 1 files
Logo Logo
Loading...