Limit and stop orders

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18785 quote
    fwsimfwsim
    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
    NicolasNicolas
    Keymaster
    Legend

    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
    fwsimfwsim
    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
    NicolasNicolas
    Keymaster
    Legend

    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.
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

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

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