limit to one trade for each day

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #16681 quote
    Abz
    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
    CKW
    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.

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

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