Cumulative order error

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10042 quote
    absent1980
    Participant
    Average

    HI everyone,

    I am working on a code with cumulative orders. I am able to backtest it but cannot forward test it due to following error (attached).

    Code is:
    
    IF c3 THEN
    SELL Positionsize PERPOINT AT MARKET
    ENDIF
    If CountOfPosition < 4 AND TRADEPRICE > increment AND ShortOnMarket  THEN
    SELL positionsize perpoint at market
    ENDIF
    
    // Conditions to exit short positions
    indicator7 = ExponentialAverage[x](close)
    indicator8 = ExponentialAverage[y](close)
    c4 = (indicator7 CROSSES OVER indicator8)
    
    IF c4 THEN
    EXITSHORT  AT MARKET
    ENDIF

    Can anyone suggest what i am doing wrong?

    Thank you.

    Capture.png Capture.png
    #10049 quote
    Nicolas
    Keymaster
    Legend

    SELL is the instruction to close BUY orders. If you want to go short on market, use SELLSHORT instead.

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

Cumulative order error


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
absent1980 @absent1980 Participant
Summary

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

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