Orders do not execute

Forums ProRealTime English forum ProOrder support Orders do not execute

Viewing 7 posts - 1 through 7 (of 7 total)
  • #187294
    sam

    Hi,

    I am just new to Prorealtime. I have been trying to place orders through pre-defined strategies on a demo account. But orders do not execute. I have tested an order as simple as below. But still no luck. It would be so much appreciated if I can get some help to undrestand why my orders do not execute.

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated

    BUY 1 SHARE AT MARKET

    // Stops and targets
    SET STOP %LOSS 10
    SET TARGET %PROFIT 1

    #187295

    Hi there Sam,

    Is the Market open for the chart / instrument you are trying this on ?

    Is the TimeFrame of the chart sufficiently small (like 1 minute) to test it, hence wait for the next bar to occur which is when your code will be called ?

    Regards and welcome !
    Peter

     

    #187412
    sam

    Hi Peter,

    Thanks for your help. Market is not open as I am in Australian and I am trying to pre order my strategies to get executed at market open in US. I will try with a smaller time frame. However, I believe in this scenario I have to limit the entries to 1 per day.

    Best Regards

    Sam,

     

    #187418

    Sam, I am not even sure what happens in your situation, because it depends on settings and order type. However, would you try a normal manual order in this situation, and it is not accepted (message about the market being closed) then you can bet that with the AutoTrade program just nothing will happen (no error message, which would be normal behavior IMO).

    1. Try to find a manual order (type) which is accepted pre-market (should be a Limit order which you can always throw out again before it is filled).
    2. When found, try to code that (something with the LIMIT keyword in the Buy xx contracts (etc.) command.
    3. But try to figure out whether it will do what you want to achieve in the first place.

    And do notice that you will not be the first one who tries what you just described via AutoTrading, while a manual order could do just that for you. Read :
    When you found that command by manual trading, you will see that you are set and done. 🙂 … No AutoTrading required …

    Oh, do notice that for you this is related to a. being able to trade outside of regular trading hours while b. you do NOT want that (otherwise a Market order is filled right away (if someone wants to sell at that moment). Investigate ETH (Extended Trading Hours). You would want those Off. See attachment. I have it On and I would not be able to do what you want in the first place. Please notice : this is PRT-IB (Interactive Brokers). For PRT-IG this setting does not exist in the first place (AFAIK) and whether you can trade in ETH I don’t know (but if Yes, you won’t achieve what you want).

    Peter

    #187565
    sam

    Hi Peter,

    Thanks a lot for your detailed explanation. It helped a lot. I am making a good progress.

    Regards,

    Sam

    #187853
    sam

    Hi,

    I have seen people use a code similar to the below successfully. I eliminated all the conditions just to check if I can simply open a position. The time frame was 1 minute. But multiple attempts to open a position were mainly failed. Worked in 2 occasions though. I need some help to understand what I am doing wrong ?

    Regards,

    Sam

     

    #187855

    Hi Sam,

    You logic works, but your line 20 messes up with things. This works better :

    Unless you really want to make 30% profit, an order waiting for that 30% hangs in there forever.
    That may happen, but not for a while. So this “mainly” fails. 😉

    Regards,
    Peter

     

     

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

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