heikin ashi 1h e moving average 200

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #98871 quote
    antonio perini
    Participant
    New

    ciao a tutti! sono sono bravo a programmare, se qualcuno fosse così gentile da creare un tradin system basato sulle heikin ashi 1h che entra long alla chiusura della prima rialzista e short alla chiusura della prima ribassista solo quando il prezzo è rispettivamente sopra e sotto la ma200. vi ringrazio in anticipo

    #98878 quote
    robertogozzi
    Moderator
    Master

    >> Inserite il segno di spunta all’interno della casella sul vostro profilo, per aggiornare il vostro paese. <<
    Grazie.

    #98881 quote
    robertogozzi
    Moderator
    Master

    Eccola, ho messo uno SL ed un TP altrimenti non c’era nessuna uscita. Le variabili commentate non sono utilizzate, le ho lasciate solo per inserire la definizione completa delle candele HA:

    if barindex > 0 then
       xClose  = (open+close+low+high)/4    //TotalPrice
       xOpen   = (xOpen[1]+xClose[1])/2
       //haHigh  = Max(xOpen, xClose)
       //haLow   = Min(xOpen, xClose)
       //xHigh   = Max(High,haHigh)
       //xLow    = Min(Low,haLow)
       //xRange  = abs(xClose - xOpen)
    else
       xClose  = (open+close+low+high)/4    //TotalPrice
       xOpen   = (Open[1]+Close[1])/2
       //haHigh  = Max(xOpen, xClose)
       //haLow   = Min(xOpen, xClose)
       //xHigh   = Max(High,haHigh)
       //xLow    = Min(Low,haLow)
       //xRange  = abs(xClose - xOpen)
    endif
    Rialzista  = xClose > xOpen
    Ribassista = xClose < xOpen
    Media      = average[200,0](xClose)
    Rialzo     = Rialzista AND Ribassista[1] AND xClose > Media //cambio colore candela e Prezzo sopra Media200
    Ribasso    = Rialzista[1] AND Ribassista AND xClose < Media //cambio colore candela e Prezzo sotto Media200
    IF Rialzo AND Not OnMarket THEN
       BUY 1 CONTRACT AT MARKET
    ENDIF
    IF Ribasso AND Not OnMarket THEN
       SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    SET STOP   pLOSS   50
    SET TARGET pPROFIT 200
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

heikin ashi 1h e moving average 200


ProOrder: Trading Automatico & Backtesting

New Reply
Author
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 05/20/2019
Status: Active
Attachments: No files
Logo Logo
Loading...