bug in pro order strategy is not starting

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #53008 quote
    ramarama
    Participant
    Senior
    I have written the code and works fine pro back test. when place order in real system strategy is not starting
    // Definition of code parameters
    DEFPARAM CumulateOrders = true // Cumulating positions deactivated
     
    // Conditions to enter short positions
    c1 = (close <= close)
     
    IF c1 THEN
    SELLSHORT 1 PERPOINT AT MARKET
    ENDIF
     
    x=4
    if shortonmarket then
    sellshort 1 perpoint at tradeprice(1)-x stop
    endif
     
     
    if close >= 1.00019*tradeprice then
    exitshort at market
    endif
     
    #53009 quote
    DespairDespair
    Blocked
    Master
    Your c1 looks useless. It is always true.
    #53623 quote
    victormorkvictormork
    Participant
    Veteran
    c1 = (close <= close(1))
    You need to compare close from different candles.
    #53629 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    @victormork, parentheses need to be replaced with brackets:

    c1 = (close <= close[1])

    if that is what rama meant.

    Roberto

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

bug in pro order strategy is not starting


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
rama @rama Participant
Summary

This topic contains 3 replies,
has 4 voices, and was last updated by robertogozzirobertogozzi
8 years, 10 months ago.

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