Target Price = Moving Average

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #176308 quote
    deletedaccount051022
    Participant
    New

    Hi,

    Please can someone kindly educate me on how I set a Target Price to equal a 20 period Moving Average?  I have tried the below, as well as the enclosed link, but no joy.

    TARGET

    Is it possible to update the Target Price to whatever the current value of the 20 period MA is, from one candle to the next?

    Thanks very much

    TP = Average[20](close)[1]
    
    IF c1 AND c2 THEN
    BUY 1 CONTRACT AT MARKET
    set target profit TP
    ENDIF
    @AlgoHunter1 thanked this post
    Target-Price-MA20.png Target-Price-MA20.png
    #176310 quote
    Swingueur
    Participant
    Average

    Hello,

    I think TP should be a “distance” and not a level. You may try:

    set target profit (TP-high)

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

Target Price = Moving Average


ProOrder: Automated Strategies & Backtesting

New Reply
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Swingueur
4 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/26/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...