DEFPARAM CumulateOrders = false

Forums ProRealTime English forum ProBuilder support DEFPARAM CumulateOrders = false

Viewing 4 posts - 1 through 4 (of 4 total)
  • #91998

    I have read the answers about this but I am still surprised and would like to verify I am not missing something here:

    1. the code is read at the end of each bar and orders are sent to the broker for execution
    2. once the orders are sent there is no way to communicate with the broker till the end of the next bar
    3. CumulateOrders = false as well as any other command is ignored by the broker who can not see the code

    assuming all this is all true is there still NO way to tell the broker “only run this buy/sell order once per day.(or even once per bar). period!”

     

    #92000

    Right.

    As for point 3., the brokers ignore ALL the code, not just the DEFPARAM line, it’s ProOrder asking the broker to take any action, namely placing orders.

    CumulateOrders = false will perform as its meaning reminds only if ProOrder has chances to KNOW what’s going on.

    If, at the end of a bar, you place two pending orders (Long + Short) and their entry price is not too far and the TF is big enough… they could be both triggered because ProOrder cannot deal with orders till it regains control when the bar closes. It’s not that likely, still it could happen.

    With MTF support you can use lower TF’s to reduce such a risk.

    #92040

    Thanks that is what I thought…

    My scenario is a bit more complex:

    1. on every bar create BUY and SELL orders if the BUY and SELL respectively where not triggered today and there is no profit yet today. no more then one buy/sell is allowed per day.
    2. BUY is triggered on a 15 min bar and losses after 1 bar, BUY flag is raised. no new BUY orders will come through
    3. on next bar SELL is triggered and losses on the same bar, the “SELL was triggered flag” is never flagged (code does not have a chance to run and acknowledged what happened)
    4. now we have both BUY and SELL orders that were triggered and lost, but the algo is not aware of the SELL as no flag was triggered
    5. next bar SELL is ordered again and losses -> we get 3 trades per day which is not what we want.

    I understand that lowering the TF will lower the risk but am seeking another possible solution if one exists

    BTW, last time i checked with IG they told me users had issues with MTF so they do not allow it yet (but that was about a month or 2 ago)

    #92062

    Yes, I know about the issues, I was given the same answer just yesterday.

    As to point 3., well… there can be a workaround. The main problem is that the order is being triggered and closed on the same bar, thus not giving a chance to ProOrder to acknowledge the ONMARKET status, but STRATEGYPROFIT is apdated regularly, so you can check if your STRATAEGYPROFIT <> STRATEGYPROFIT[1] AND ONMARKET = ONMARKET[1], so if now and the previous bar you were NOT OnMarket, but your STRATEGYPROFIT changed… then one of your orders must have been triggered.

    Another workaround could be checking price, if HIGH or LOW have hit your entry price you must assume a pending order has been triggered, if you also add a check of STRATEGYPROFIT, well… that should work!

     

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

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