usando candele helkin ashi programma

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

    come si scrive un programma usando le candele helkin ashi, in acquisto dopo la seconda candela verde chiusura dopo una candela rossa, viceversa in vendita, grazie

    #204963 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    // --- definizione delle candele HA
    ONCE xOpen = open
    xClose     = (open + close + high + low) / 4
    if barindex > 0 then
       xOpen  = (xOpen[1] + xClose[1]) / 2
    endif
    // --- fine definizione
    Verde      = xClose > xOpen
    Rossa      = xClose < xOpen
    IF Rossa[2] AND Verde[1] AND Verde AND Not LongOnMarket THEN
       BUY 1 Contract at Market
    ELSIF Verde[2] AND Rossa[1] AND Rossa AND Not ShortOnMarket THEN
       SELLSHORT 1 Contract at Market
    ENDIF

    fa lo Stop & Reverse, chiudendo la posizione opposta quando c’è un nuovo segnale.

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

usando candele helkin ashi programma


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
cimsal @cimsal Participant
Summary

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

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