bug in pro order strategy is not starting

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #53008 quote
    rama
    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
    Despair
    Blocked
    Master

    Your c1 looks useless. It is always true.

    #53623 quote
    victormork
    Participant
    Veteran
    c1 = (close <= close(1))

    You need to compare close from different candles.

    #53629 quote
    robertogozzi
    Moderator
    Master

    @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.

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 robertogozzi
8 years, 3 months ago.

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