Strategyprofit

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

    Buonasera a tutto lo staff.

    chiedo cortesemente aiuto per impostare questa funzione:

    prima operazione long

    se prima operazione chiude in gain allora la seconda operazione  sarà long e fino a quando chiude in gain il sistema continua ad eseguire operazioni long

    quando poi chiude in loss allora l’operazione successiva sarà short e se  l’operazione short chiude in gain il sistema continuerà ad eseguire operazioni short

    fino a quando prende uno stop e da li inizia ad eseguire operazioni long  nuovamente.

     

     

    Praticamente fino a quando il sistema guadagna si opera in direzione dell’ultimo trade

    quando il sistema perde la successiva operazione sarà in direzione contraraia al precedente.

     

    Grazie per la collaborazione

    max

    #139079 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccolo:

    once LongTrade = 1
    If StrategyProfit < StrategyProfit[1] then //in caso di perdita
       LongTrade = abs(LongTrade - 1)   //passa da long a short e viceversa
    Endif
    If LongTrade and Not OnMarket then
       Buy 1 contract at market
    Endif
    If not LongTrade and Not OnMarket then
       Sellshort 1 contract at market
    Endif
    Set Target pProfit 100
    Set Stop   pLoss   50
    
    Mauro T. "Algorithm System" thanked this post
    #139081 quote
    romanelli4romanelli4
    Participant
    Average

    oh!

    grazie Roberto

    anche di domenica

    lo provo Subito

    Un saluto

    max

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

Strategyprofit


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
romanelli4 @romanelli4 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by romanelli4romanelli4
6 years, 2 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 07/12/2020
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...