strategia trend following

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #162548 quote
    emanuele81
    Participant
    Senior

    Buonasera , vorrei creare una strategia trend following, cerco di spiegare come deve essere il codice,

    ingresso long, quando la chiusura di una candela long avviene sopra al massimo della prima candela short più vicina, ingresso short il contrario, naturalmente questa è solo una delle condizioni, le altre le ho già sviluppate.

    grazie

    #162551 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    Bullish = close > open
    Bearish = close < open
    If Bearish then
       MaxShort = high
    Elsif Bullish Then
       MinLong  = low
    Endif
    If Bullish and close > MaxShort and not OnMarket Then
       Buy at Market
    Endif
    If Bearish and close < MinLong and Not OnMarket then
       Sellshort at Market
    Endif
    #162638 quote
    emanuele81
    Participant
    Senior

    grazie mille Roberto

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

strategia trend following


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
emanuele81 @emanuele81 Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by emanuele81
4 years, 11 months ago.

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