CUMULATEORDERS – COUNTOFPOSITION

Forums ProRealTime English forum ProOrder support CUMULATEORDERS – COUNTOFPOSITION

Viewing 12 posts - 1 through 12 (of 12 total)
  • #182578

    Hi.
    If i want to create at strategy with CUMULATEORDERS. Maximun 1 long position and 1 short position at once.
    What do i choose in “MAX Position” when i start the tradingsystem?

    #182581

    You cannot open opposite positions (Long & Short) in the same strategy.
    Anytime you go Long any previous Short position still open will be closed. The other way round when you go Short.
    PositionSize is correct, but it must be defined before being used.

    #182584

    It need to look like this?

    #182588

    What do i choose in “MAX Position” when i start the tradingsystem?

    1.

    However, I would be very careful with depending on that, because in my particular case it seems it does not work reliably. And do notice that this happens specifically in the situation that the Strategy additionally buys. In other words, enter less in that field than the Strategy wants to do and nothing ever starts (taking position), but set it to e.g. 1 and let the Strategy take position – then when it additionally want to take position (make 2 from 1) then it just does it.
    Thus, take care of not depending on it, as it seems that you do that (not 100% sure).

    1 user thanked author for this post.
    #182594

    MAX positions set when starting the strategy in autotrading and the number of lots/contracts coded with BUY/SELLSHORT grant that the lowest of the two is the one actually used, so if Max is set to 999 but you BUY 1, only 1 contract will be bought, if you set Max to 5 and BUY 10, then only 5 contracts will be bought.

    I have never had problems with this, so far.

     

    #182598

    The way I do it is not to control the number of contracts, but the number of entries. This way you can let your MM alter the positionsize.

    You can repeat the elsif and flags 4, 5, 6 as many times as you want. You can also create different conditions for the additional positions (CBA vs CB).

    Eg. you might start the first entry within a certain time range, but let it add extra positions outside of that (ie overnight)

    or add other criteria such as “positionperf <0” so that your aggregate is always averaging down.

    1 user thanked author for this post.
    #182602

    if you set Max to 5 and BUY 10, then only 5 contracts will be bought.

    Maybe you have a special system, but mine (for IG) does not enter at all in that case (which is what I am happy with or else things will happen I did not code).
    Maybe I am wrong with my observations.

    #182622

    Yes, you are right PeterSt, if you set MAX=5 then if you BUY more than 5 no trade is opened.

    You can only buy 5 or less contracts. It makes sense.

    Actually I never used that, I always set MAX=999 then I apply lot size management up to that limit.

     

     

     

    #182632

    Actually I never used that, I always set MAX=999 then I apply lot size management up to that limit.

    Yes, I did too, until I dynamically started to increase the position (during the original Trade-opening). So now I limit it (with say 5) in order not to run into an out of money and *that* part seems not to work reliably. So this is the other half of the story (“be careful with that !”) but it is hard to test – waiting for the situation to happen.
    See example of what I am talking about (if not obvious in the first place).

    #182635

    I see, but with Lot & Money management that shouldn’t happen!

     

    #182637

    I most certainly agree and this is in there all right (see attachment). Meanwhile with such setups I like to have an extra protection. Thus, I set my own MM a tad too high deliberately and want to see if that extra protection (by PRT) works.

    N.b.: It s also testing myself (or my code) in order to see what actually happens and how decent I coded it. Thus, if an order is rejected, how do I actually notice that, and is that not one bar too late to remain in control. Understand ?

    #182639

    Ok, that’s clear.

     

Viewing 12 posts - 1 through 12 (of 12 total)

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