IL FILTRO ORARIO

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #214925 quote
    Hary TradingHary Trading
    Participant
    New

    Buongiorno,

    grazie in anticipo a chi vorrà aiutarmi

    ho difficoltà a scrivere un codice che preveda una sorta di filtro orario.

    Mi spiego meglio con un esempio:

    Entra alle ore 16:00 ed esci alle ore 18:00 solo se fino a quel momento la giornata (intesa come, per esempio se parlassimo di NQ, dalle 00:00 alle 15:59) è stata positiva

    Grazie ancora per la disponibilità

    Hary

    #214939 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccolo:

    IF (OpenTime = 000000) OR ((OpenTime > 000000) AND (OpenTime[1] > OpenTime)) THEN
       Inizio = open
       Fine   = 0
    ENDIF
    IF (OpenTime = 155900) OR ((OpenTime > 155900) AND (OpenTime[1] < 155900)) THEN
       Fine   = close
    ENDIF
    IF Time >= 160000 AND (Fine <> 0) THEN
       IF Fine > Inizio THEN
          BUY 1 CONTRACT AT MARKET
          Fine = 0
       ENDIF
    ENDIF
    IF (Time >= 180000) AND LongOnMarket THEN
       SELL AT MARKET
    ENDIF
    Steven11 thanked this post
    #214955 quote
    Hary TradingHary Trading
    Participant
    New

    Grazie per la grande disponibilità Roberto

Viewing 3 posts - 1 through 3 (of 3 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

IL FILTRO ORARIO


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Hary Trading @adtrader Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Hary TradingHary Trading
3 years, 4 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 05/20/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...