Target profit con bande di B.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34569 quote
    Luigi5192
    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
    DANY
    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
    Luigi5192
    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.

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 Luigi5192
8 years, 9 months ago.

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