Spiegazione riga codice

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #155663 quote
    danistuta
    Participant
    Senior

    Ho trovato questo codice in uno script, quale è il significato preciso?

    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0

    Grazie mille.

    #155667 quote
    GraHal
    Participant
    Master

    Nessuna negoziazione sarà aperta il sabato o la domenica

    robertogozzi thanked this post
    #155676 quote
    robertogozzi
    Moderator
    Master

    Esatto, puoi usare:

    IF Not daysForbiddenEntry THEN

    è scritto in modo logicamente inverso a quanto dovrebbe essere più naturale, ovvero in una forma positiva, non negativa, tipo:

    DaysAllowed = OpenDayOfWeek >= 1 AND OpenDayOfWeek <= 5
    IF DaysAllowed THEN

    però funziona.

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

Spiegazione riga codice


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
danistuta @danistuta Participant
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 12/30/2020
Status: Active
Attachments: No files
Logo Logo
Loading...