Target profit con bande di B.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34569 quote
    Luigi5192Luigi5192
    Participant
    Average

    Salve a tutti, ho un problema con il target profit del mio sistema, cioè vorrei inserire un ordine long e target profit sulla banda superiore di Bollinger e un ordine short e target profit sulla banda inferiore.

    Ho provato a fare questo codice:

    if LONGONMARKET then
    valoreuscitalong = BollUp*POINTVALUE
    SET TARGET PROFIT valoreuscitalong
    endif

    dove Bollup sta definita prima, ma il sistema non mi chiude la posizione nella banda superiore ma la fa girare fino a che prende il stop loss.

    #34581 quote
    DANYDANY
    Participant
    Senior

    Ciao,

    non avendo il codice completo non riesco a testare se è ok il suggerimento, ad ogni modo dovrebbe essere qualcosa di simile a questo:

     

    if LONGONMARKET then

    valoreuscitalong = BollUp*POINTVALUE
    SELL 1 contracts AT valoreuscitalong stop

    endif

     

    Io però lo scriverei così:

    c1 = (High >= BollingerUp[30](close))

    If c1 then
    sell at market
    endif

    Nicolas thanked this post
    #34586 quote
    Luigi5192Luigi5192
    Participant
    Average

    Ok grazie funziona la seconda che avete scritto.

    La ringrazio.

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

Target profit con bande di B.


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Luigi5192 @luigi5192 Participant
Summary

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

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