Number of open positions?

Forums ProRealTime English forum ProBuilder support Number of open positions?

Viewing 9 posts - 16 through 24 (of 24 total)
  • #30393

    Thank you very much Nicolas!

    One more question if you do not mind: do you know how to increase position size as my capital grows? I always want to risk a fixed percentage per trade but I want contract size to increase or decrease depending on the performance of the system.

    Sincerely

    Mikael

    #34819

    Thank you Nicolas,

    you have been of great help. Just one more question: My code works both in back-testing and on the demo-account but not when I try to use it on my real account. It just says: “This trading system was stopped because the historical data loaded was insufficient to calculate at least one indicator during the evaluation of the last candlestick. Please increase the number of preloaded bars with the instruction DEFPARAM in the code of your strategy (ex: DEFPARAM Preloadbars = 2000). For additional assistance, please refer to the help text of the DEFPARAM function in the trading systems programming manual.”

    I have defparam cumulate orders=false

    Do you know why this is?

    Can I have more than one defparam command in the first line?

    Sincerely

    Mikael K.

    #34854

    Yes, you can add as many defparam you need. About the preloadbard, obviously your strategy need to get in memory enough bars in advance to compute correctly some of your indicators.

     

    1 user thanked author for this post.
    #34919

    Yeah, was way to many bars that needed to be computed, that why it did not work.

    Another question: my system uses limitorders (e.g., “buy at xxx limit”) and trades during the london session (e.g., “if time >090000 and time < 170000”). The system trades well during the session but once the end of day is reached it shuts down if a limit order still isn’t activated. To avoid having to restart the system every morning, I would like to cancel the limit order when London closes. Do you know if this is possible?

    Sincerely

    Mikael K.

    #35723

    Awesome Nicolas,

    I am using a strategy that cumulates orders and therefore buys at different prices. I am also trying to build in money management but I am having some trouble. I would like to store to buy price of the first order so I can determine contract size of the next order and so on. I would like this to be stored for the duration of an open trade and then recalculate it next time the program opens the first order of the next trade. Is that possible?

    Sincerely

    Mikael K.

    #35758

    You can use the tradeprice keyword for that purpose.

    1 user thanked author for this post.
    #36150

    Thank you Nicolas,

    My code relies on dclose(o) being above ma200. Since i trade on 4H time frame I used ma1200 in my back-testing and it works great. When I execute it live I get an error message saying not enough data can be loaded. I have tried using defparam preloadbars 2000 but it does not seem to work. Is it possible to load the daily MA200 to the 4H timeframe some other way?

    Sincerely

    Mikael K.

    #36165

    Is it an MA or an EMA? What instrument? Difficult to give more advices without the code.

    #61064

    Hello again Nicolas,

    is it possible to code for custom trading hours on daily-candles? As it is now it takes position at 00:00 and I would like to change that to 12:00.

     

    Sincerely

    Mikael

Viewing 9 posts - 16 through 24 (of 24 total)

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