richiamare ultima operazione long e short

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

    vorrei porre condizioni del tipo “se l’ultima entrata a mercato era long allora…” , ma non riesco a capire come posso riferirmi all’ultima/penultima operazione eseguita dopo che è stata chiusa.

    #165023 quote
    robertogozzi
    Moderator
    Master

    La miglior cosa è salvare in una variabile il tipo di entrata, quando la esegui:

    ONCE TipoEntrata = 0    //1=Long, 2=Short
    IF MieCondizioniLong THEN
       BUY AT Market
       TipoEntrata = 1
    ELSIF MieCondizioniShort THEN
       SELLSHORT AT Market
       TipoEntrata = 2
    ENDIF

    qindi TIPOENTRATA è la variabile che ti dice di che tipo era l’ultima entrata.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

richiamare ultima operazione long e short


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
bahl @bahl Participant
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 03/23/2021
Status: Active
Attachments: No files
Logo Logo
Loading...