Trading System Getting Stopped

Forums ProRealTime English forum ProOrder support Trading System Getting Stopped

Viewing 5 posts - 1 through 5 (of 5 total)
  • #192351

    Hi,

    I am getting below message when looking at the warning of a stopped trading system:

    “The trading system was stopped because an indicator received a negative or zero parameter ex:(-10).

    You can modify your code to to prevent negative parameters then backtest the system to check the correction.”

    Is there a way to find where in the code I am getting it? I mean is there a way to debug it? or only option is to use graph/graphonprice?

    Regards.

     

    #192363

    I see the problem now.

    TimesTraded=0
    FOR i=0 to 10 do
    if tradeprice(i) = myLong then
    TimesTraded = TimesTraded +1
    endif
    next

    where myLong is a number/support (e.g.  13010 on nas). All I am trying to do is if this level was traded by the program already.  Then, in my limit order I try to do:

     

    IF NOT LongOnMarket AND TIMEOPERATE AND LongCondition and TimesTraded < 3 THEN

    SET STOP LOSS Sl
    SET TARGET PROFIT ProfitLimit
    myBuyPrice = myLong
    ENDIF

    How can I fix the first part to avoid the system getting stopped because of the error mentioned in the first post? Any idea? Thanks

    #192375

    Not sure the problem is located in this part of the code, are you sure you are not using an indicator with a zero or negative variable as a period?

    #192428

    Thanks. I will check.

    Tonight right after its operating hour start at 1am (TIMEOPERATE = TIME>010000 AND TIME<205500 //1am to 855pm), it gave below error:

    The trading system was stopped due to a division by zero in one of its sub-functions during the evaluation of the last candlestick.
    You can add protections to your code to prevent divisions by 0 then backtest the system to check the correction.

    I will check my indicator.

    #192583

    Hi,

    In below code, I try to see if a level has been used certain number of times but when I enable the strategy in automatic trading, on start of the candle, it gives error.

    Results in

    If no trade has happened, what is the default value of tradeprice?

    Regards.

     

Viewing 5 posts - 1 through 5 (of 5 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login