Max number of orders
Forums › ProRealTime English forum › ProOrder support › Max number of orders
- This topic has 5 replies, 3 voices, and was last updated 2 years ago by PeterSt.
-
-
03/23/2022 at 6:21 PM #190365
Hi all,
seeking confirmation if my understanding how the setting of max number of orders allowed per trading day (from 00:00 GMT) works (part of Automatic Trading settings).
Example: limit sets to = 4
When the first trade is executed the Position opened counts for 1
Then if the order is amended with Stop loss and take profit the count goes up to 3 (but still < 4 limit).
Then if the first order is closed, then the counter is then updated to 2 (two orders executed but zero left running).
==========
Second trade, same day:
Position is opened = counter goes up to 3
Position is amended with stop loss and take profit = counter goes up to 5 and therefore > the limit therefore the strategy quits and the order is forced to close.
In conclusion: in order to allow 2 trades per each day, I need to set this parameter to minimum 6 if my trades include stop loss and take profit levels.
Is my understanding correct, in your view?
Many thanks, Gaby
03/24/2022 at 8:55 AM #19038203/24/2022 at 9:47 AM #190397But Nicolas, how would you count the “real” orders ? Like Entry and Exit (= 2 orders) or In+Out (= 1 order) ? Both would suffice (for what Gaby wants to know, but for me actually the same), but for both I would not readily have a solution. There’s finicky stuff with StrategyProfit <> StrategyProfit[1] but this is not really reliable (IIRC this relates to Spread being added after the Exit(-bar) and that changing StrategyProfit *again*.
?
03/24/2022 at 3:33 PM #190419We are all used to count the market orders if you buy/sellshort at market with a variable increase.
Or use this snippet:
1( (not onmarket and onmarket[1] and not onmarket[2]) or (tradeindex(1)=tradeindex(2) and tradeindex(1)=barindex[1] and tradeindex(1)>0) )New keywords will come in the weeks to come:
ShortTriggered[N] / LongTriggered[N]
Allows to know if a Short / Long position has been opened on the candlestick N (optional default N is 0)03/24/2022 at 4:12 PM #190423Apologies Nicolas, I did not understand your answer.
I do not count orders in my code; it is Prorealcode that counts the orders and then check the configuration of the parameter called”stop due to number of orders”.
I have attached a picture of the configuration, hoping it is more clear.
Again, what it is not clear to me from the description is: what orders ProrealCode is counting, to then compare the parameter level that in the meantime I have increased to 7 to avoid unwanted order closing.
Thanks. Bye, Gaby
03/24/2022 at 8:04 PM #190436 -
AuthorPosts
Find exclusive trading pro-tools on