target in the top or bottom of candle

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5756 quote
    bernt
    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
    Adolfo
    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.

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 Adolfo
9 years, 10 months ago.

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