stop in pari

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #197561 quote
    cimsal
    Participant
    Junior

    gentilmente come posso aggiungere ad un mio sistema uno stop in pari o in gain di 1 punto, grazie

    #197572 quote
    robertogozzi
    Moderator
    Master

    Per mettere lo SL in pari scrivi:

    Set Stop Breakeven

    Per metterlo ad 1 punto oltre il prezzo d’entrata:

    Set Stop Price (TRADEPRICE + 1*PipSize)
    #197598 quote
    cimsal
    Participant
    Junior

    grazie, a che punto mettere la riga, di nuovo grazie

    #197602 quote
    robertogozzi
    Moderator
    Master

    Dipende da come è strutturato il tuo codice; immagino che vorrai metterlo quando c’è un certo profitto.

    Esempio:

    Profitto = PositionPrice * PositionPerf / PipSize
    If Profitto > X then
       Set Stop Breakeven
    Endif

    X è il numero pips dopo i quali mettere lo stop loss in pareggio.

    #197660 quote
    cimsal
    Participant
    Junior

    scusi ma non mi funziona

    #197708 quote
    robertogozzi
    Moderator
    Master

    A me funziona correttamente:

    if close crosses over average[100] then
       buy at market
    elsif close crosses under average[100] then
       sellshort at market
    endif
    set target pprofit 300
    set stop   ploss   100
    Profitto = PositionPrice * PositionPerf / PipSize
    If Profitto > 50 then
       Set Stop Breakeven
    Endif
    graphonprice PositionPrice
    graph positionprice * positionperf / pipsize AS "Pips"
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

stop in pari


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
cimsal @cimsal Participant
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 07/20/2022
Status: Active
Attachments: No files
Logo Logo
Loading...