Handelssystem wird jede Nacht angehalten?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #252995 quote
    wheelerwheeler
    Participant
    New

    Ich habe ein Handelsystem programmiert, das im Live Handel jede Nacht um 1:25 oder 1:30 Uhr wegen einer Division durch Null angehalten wird. Ansonsten läuft es. Das passiert komischer Weise nicht über das Wochenende. Der Backtest läuft durch ohne Probleme, nur als automatisches Live System wird jede Nacht abgebrochen. Das System löst nur Trades zwischen 8:00 und 22:00 Uhr aus.

    Die einzige Funktion, die überhaupt eine Division enthält, ist die zur Bestimmung der Postionsgröße bzw. des Stop Loss:

    capital = 50000
    risk = capital*0.003

    TPRLong = 7 //Take Profit Faktor Long

    SLLongAdjust = 2.0 //Einstellung SL Entfernung Long 1=Low Entry Bar, 0,5 = 50% des Abstandes

    // Bedingungen zum Einstieg in Long-Positionen
    // Positionsgröße und SL Long Trades
    if close > low then
    Positionsize = round(risk/((close-low)*SLLongAdjust),2)
    endif
    sllong = (close-low)+0″

    Woran kann das liegen?

    Danke im Voraus…

    #252996 quote
    JSJS
    Participant
    Master

    Hi,

    Zu den angegebenen Zeiten kann eine „flache“ Kerze (keine Ticks) entstehen, bei der Close = Open = Low = High ist…

    Dadurch entsteht während der Berechnung der „Positionsgröße“ eine Division durch Null (risk / (close – low) = risk / 0)…

    Um dies zu vermeiden, solltest du eine zusätzliche Bedingung hinzufügen:

    If Close>Low and (Close-Low)<>0 then

    robertogozzi and Iván González thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Handelssystem wird jede Nacht angehalten?


ProOrder: Automatischer Handel & Backtesting

New Reply
Author
author-avatar
wheeler @wheeler Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by JSJS
11 months, 1 week ago.

Topic Details
Forum: ProOrder: Automatischer Handel & Backtesting
Language: German
Started: 10/24/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...