target in the top or bottom of candle

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

    Hi im new one ,i want to ask haw i write in the program ,that i want to sell the position in the closing price off candle  ,up and down .I cant find a target command to do that.

    #5758 quote
    AdolfoAdolfo
    Participant
    Senior

    Hi! Did you try?:

    REM LONG
    target1=High[1]  //Could be "close" "open"...etc
    IF LongOnMarket then
    sell at target1 limit
    endif
    
    REM SHORT
    target2=Low[1] //Could be "close" "open"...etc
    
    IF ShortOnMarket then 
     exitshort at target2 limit 
    endif

     

    This code will set the target at the top or bottom of previous candle.

    Cheers!

Viewing 2 posts - 1 through 2 (of 2 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

target in the top or bottom of candle


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
bernt @bernt Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/21/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...