reverse dopo lo stop

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #86106 quote
    romanelli4romanelli4
    Participant
    Average

    Salve,

    Ho un ts e nel momento in cui vengo stoppato mi piacerebbe testare l’entrata contrarian con uno stop e profit diversi dal primo ts….esempio:

    Sono long ed ho uno stop fisso di 20 punti.

    Vengo stoppato.

    vorrei entrare short con stop e profit di x punti……

    Qualcuno sa se si può codificare?

    grazie

    #86107 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Per verificare se prima eri Long ed adesso sei uscito devi mettere

    IF Not LongOnMarket AND LongOnMarket[1] THEN
     .
     .
    ENDIF

    ovviamente per gli short è lo stesso, solo che usi SHORTONMARKET.

    Per verificare se sei uscito in perdita o profitto da un Long verifichi il prezzo di uscita con quello di entrata

    IF TradePrice(1) > Tradeprice(2) THEN    //Perdita
     .
    ELSE                                     //Profitto
     .
    ENDIF

    ovviamente l’opposto per gli Short.

    Dopodichè, verificato se hai avuto uno SL dai l’ordine d’entrata in direzione opposte con lo SL che preferisci.

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

reverse dopo lo stop


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
romanelli4 @romanelli4 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
7 years, 10 months ago.

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