ingresso condizionato

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

    Buongiorno, avrei una richiesta, avrei la necessita di fare un entrata condizionata su 3 medie mobili.

    Praticamente l’ingresso deve avvenire quando la distanza tra una media e l’altra è superiore a 20 pip, quindi con 3 medie una  a 5 periodi una a 10 e la terza a 20, dopo l’incrocio quando la distanza aumenta e supera i 20 pip avviene l’ingresso, naturalmente le medie devono essere per il long in sequenza dall’alto 5-10-20, la distanza in pip deve essere tra la media a 5 e quella a 20 per lo short al contrario.

    Grazie

    #158120 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccolo (non provato):

    Ma5     = average[5,0](close)
    Ma10    = average[10,0](close)
    Ma20    = average[20,0](close)
    Diff    = (abs(Ma5 - Ma20) > 20 * PipSize)
    Bullish = (Ma5 > Ma10) and (Ma10 > Ma20) and Diff
    Bearish = (Ma5 < Ma10) and (Ma10 < Ma20) and Diff

    Usa le condizioni Bullish e Bearish, insieme ad eventuali tue altre condizioni, per entrare Long o Short.

    #158140 quote
    emanuele81emanuele81
    Participant
    Senior

    grazie Roberto

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

ingresso condizionato


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
emanuele81 @emanuele81 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by emanuele81emanuele81
5 years, 8 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 01/17/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...