Number of open positions?
Forums › ProRealTime English forum › ProBuilder support › Number of open positions?
- This topic has 23 replies, 3 voices, and was last updated 6 years ago by Mikael K.
-
-
03/30/2017 at 6:19 PM #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
05/08/2017 at 2:05 PM #34819Thank 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.
05/08/2017 at 7:06 PM #34854Yes, 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.
05/09/2017 at 11:17 AM #34919Yeah, 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.
05/16/2017 at 4:55 PM #35723Awesome 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.
05/17/2017 at 8:02 AM #35758You can use the tradeprice keyword for that purpose.
1 user thanked author for this post.
05/20/2017 at 11:39 AM #36150Thank 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.
05/20/2017 at 4:35 PM #3616501/31/2018 at 10:23 AM #61064 -
AuthorPosts
Find exclusive trading pro-tools on