Limit and stop orders

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18785 quote
    fwsim
    Participant
    New

    Hi, I would like to programme the following, perhaps someone has done it already. I would like to buy one contract if price is greater than the bar open. But I want probuilder to place a buy stop order and a stop order at the same time. I do not want to buy at market, I want to buy at a level higher than where the market is trading, hence a buy stop. Can anyone help me with the code for that? Thanks in advance

    #18792 quote
    Nicolas
    Keymaster
    Master

    Topic moved to ProOrder support (automated trading related).

    About your request, let’s say you want to buy at Close plus 5 points above this level, only if the current bar has closed above the open:

    defparam cumulateorders=false
    
    if close>open then 
     BUY 1 SHARE AT close+5*pointsize
    endif
    

    This code will be read and executed once at bar close, the stop order will remain only 1 bar. The condition will be tested again at next bar Close. Hope it helps, let us know.

    #18838 quote
    fwsim
    Participant
    New

    Thanks for the reply. Is there anyone you can recommend who can programme an entire trading system for me? I sent a request via the website and am awaiting a reply.

    #18839 quote
    Nicolas
    Keymaster
    Master

    I’ll reply asap Fergus, thanks for your patience 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Limit and stop orders


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
fwsim @fergussimpson Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Nicolas
9 years, 2 months ago.

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