Close system at Next day

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #123850 quote
    Fran55
    Participant
    Veteran

    Hi.

    I want that the system fails an operation does not operate until the Next day.

     

    Thanks!

    #123862 quote
    robertogozzi
    Moderator
    Master
    ONCE TradeON = 1
    IF IntraDayBarIndex = 0 THEN
       TradeON = 1
    ENDIF
    IF StrategyProfit < StrategyProfit[1] THEN
       TradeON = 0
    ENDIF
    IF MyConditionsLong AND TradeON THEN
       BUY AT MARKET
    ENDIF

    There you go, add (as I did) TradeON to your conditions to open a trade.

    #124006 quote
    Fran55
    Participant
    Veteran

    Thanks Roberto.

     

    One other question, please…

    I want when the system loss 2% of total gain in one day… The system dont operate until the Next day.

     

    Thanks!

    #124007 quote
    robertogozzi
    Moderator
    Master

    Similar to the one above:

    ONCE TradeON = 1
    ONCE Capital = 10000         //this is your initial capital
    IF IntraDayBarIndex = 0 THEN
       TradeON  = 1
       MyProfit = Capital + StrategyProfit
    ENDIF
    IF (MyProfit - (Capital + StrategyProfit)) >= (MyProfit * 0.02)  THEN
       TradeON = 0
    ENDIF
    IF MyConditionsLong AND TradeON THEN
       BUY AT MARKET
    ENDIF

    Then add TradeON to your conditions to open a trade, as above.

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

Close system at Next day


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Fran55 @fran55 Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by robertogozzi
5 years, 11 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/29/2020
Status: Active
Attachments: No files
Logo Logo
Loading...