non mi entra correttamente…

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #205094 quote
    Mauro MMauro M
    Participant
    New

     

    mi entra solo a prezzo di chiusura del giorno precedente. vorrei che mi entrasse a metà range del giorno precedente. Grazie.

     

    DEFPARAM CUMULATEORDERS=TRUE
    c1=CLOSE >OPEN
    C2=HIGH-CLOSE<=15
    SMA= average[25](close)
    C3=close>SMA

    c51=HIGH-low<=250
    C5=(high-low)>100
    C6=(high-low)/2
    k= close – c6
    C10=barindex-tradeindex=1
    // Condizioni per entrare su posizioni long
    IF C1 AND C2 AND C3 AND C5 and c51 THEN
    buy 1shares at k STOP
    ENDIF
    If LongOnMarket AND c10 THEN
    SELL AT MARKET
    ENDIF
    set stop ploss 70
    set target pprofit 140

    #205117 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Metà del range è:

    k = high - c6   //oppure k = low + c6

    se aggiungi:

    graphonprice k

    vedrai bene il livello di prezzo.

    #205120 quote
    Mauro MMauro M
    Participant
    New

    Roberto anche come hai scritto tu entra sempre al prezzo di chiusura del giorno precedente e non a metà del range precedente . Testato sul dax sul daily.

    #205137 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Cambia l’ordine pendente in LIMIT, evidentemente il prezzo a cui deve entrare è migliore rispetto alla chiusura, se è così entra a mercato.

    Pending-STOP-LIMIT-Orders-Ordini-Pendenti.jpg Pending-STOP-LIMIT-Orders-Ordini-Pendenti.jpg
Viewing 4 posts - 1 through 4 (of 4 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

non mi entra correttamente…


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Mauro M @mauro-m Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by robertogozzirobertogozzi
3 years, 9 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 11/30/2022
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...