limit to one trade for each day

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #16681 quote
    AbzAbz
    Participant
    Veteran

    Hello

    is it possible to limit the program to do only one trade for buy and short in one day.

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    DEFPARAM FLATAFTER = 220000
    
    // Conditions
    a2 = RSI[14](close)
    a3 = Average[14](close)
    a4 = dclose(1) - dopen(1)
    
    // Conditions to enter Long position
    a5 = open > a3
    a6 = a2 > 40
    a7 = a4 > 25
    
    IF not onmarket and a5 and a6 and a7  then
    sellshort 2 SHARES AT MARKET
    SET TARGET pPROFIT 50
    ENDIF
    
    // Conditions to enter Short positions
    
    a8 = open < a3
    a9 = a2 < 30
    a10 = a4 < -25
    
    IF not onmarket and a8 and a9 and a10  then
    buy 2 SHARES AT MARKET
    SET TARGET pPROFIT 50
    ENDIF
    #16692 quote
    CKWCKW
    Participant
    Veteran

    Hi Abz,

    You can simply refer to strategy shared by Reiner, about Limit to number of trades per day

    http://www.prorealcode.com/prorealtime-trading-strategies/lift-up-down-trading-strategy-dax-5m/

    br,

    CKW

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

limit to one trade for each day


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Abz @abbas_sadiq Participant
Summary

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

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