Forums › ProRealTime English forum › ProOrder support › Limiting accumulating orders & Fuse › Reply To: Limiting accumulating orders & Fuse
02/21/2017 at 10:17 AM
#25833
- About your first question, here is a code snippet that should meet your requirements (forum coding, not tested):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
defparam cumulateorders=false maxorders = 10 //max orders per day //reset the count of orders each day if intradaybarindex=0 then count = 0 endif //buy order if buycondition and count<maxorders then buy 1 share at market endif //counting orders if onmarket and lastindex<>tradeindex then count=count+1 lastindex=tradeindex endif |
2. I think you already have what needed in this blog article? : https://www.prorealcode.com/blog/learning/max-profit-loss-day-trading-strategy/