DEFPARAM CumulateOrders
Forums › ProRealTime English forum › ProBuilder support › DEFPARAM CumulateOrders
- This topic has 5 replies, 4 voices, and was last updated 7 years ago by jonjon.
-
-
07/05/2016 at 9:40 AM #10216
Hi all,
Does anyone know how to put a maximum condition around DEFPARAM CumulateOrders = True ?
Something like this, returns a Syntax error:
1234if maxposition thenDEFPARAM CumulateOrders = TrueendifMaxposition = countofposition[0]<50 and countofposition[0]>-50 //Max 50 long or 50 Short07/05/2016 at 9:57 AM #10217Wrapping the If statement around the Entry trade order doesn’t work either because the system will add to a position >50 and then not exit the entire position and is then stopped out.
I.e. Position was 48. TS added 12 to give 60. Since 60 > 50 the TS then doesn’t exit.
07/05/2016 at 10:59 AM #1022407/10/2016 at 2:09 PM #10380Hi Grizzly I’m intrigued on something that will open up to 50 positions.
Why have you got: “
countofposition[0]>-50" What's the intention?
Both Long and Short positions are absolute?
Also why not just code it like:
1Maxposition = COUNTOFPOSITION <= 5007/11/2016 at 10:49 AM #1039302/24/2017 at 6:58 PM #26298Hi grizzly. I have just come across your topic from last year. I don’t know where you got on it however I’ve been looking at it recently and there is a discussion I set up (and solutions) here:
https://www.prorealcode.com/topic/limiting-accumulating-orders-fuse/#post-26297
Hope this helps
-
AuthorPosts