Stochastic K and D lines

Forums ProRealTime English forum ProOrder support Stochastic K and D lines

Viewing 6 posts - 16 through 21 (of 21 total)
  • #108454

    Ok I will check again and let you know. Just a quick question how it is supposed to work. With the Daily Hourly TF and order execution in hourly TF, how does it see the stochastic cross over?

    For example, the order ARROW appears in say BAR 2 – Does ProTrade open position based on conditions met by BAR 1?

    Please note I am using update on close in Hourly TF.

    #108458

    In Daily TF my code does not use UpdateonClose as I don’t want the candle to close before conditions are checked. I have attached a screenshot, if you look at the charts, while the daily TF (No Update on close used) was forming, the condition on lower TF was met. I have used arrow to demonstrate it. The order should have been placed at that bar if i am understanding this correctly, it was not. What could be the reason for this? Any workaround. I read somewhere that higher TF candle does not need to close if order is placed from lower TF

     

     

    #108463

    The lowest TF is called default TF because it’s the one used by ProOrder to set the pace (time interval) at which  the code is read and executed.

    In your case the Daily TF (daily hourly does not exist) is what you use as a partial setup. The Hourly TF is the one you use as a partial setup AND entry timing.

    Your code will be read and executed 24 times a day, or less if there are fewer trading hours, when each 1-hour candle closes.

    So if your 11:00:00 candle, closing at 11:59:00, shows a valid setup a trade will be entered when the 12:00:00 candle opens and that’s the candle under which you’ll see an arrow.

    Crossovers or any other condition you want to check will be verified solely within the TF where you have written them.

    Using UpdateOnClose on higher TF’s guarantees that variables are set/modified only at the closure of that candle, while not using it allows variables to be set/modified whenever the default TF closes its candle, in your case every hour.

    In your case ALL your conditions can change every hour, on the default TF because it’s the main one, the one that sets the pace, on the daily TF because you don’t use UpdateOnClose.

    #108464

    Ok according to what you have described – if updateonclose is not used in higher TF – it does not wait for Daily candle to close (Mid candle data is used from higher TF?) and runs strategy 24 times based on 1 hour. Ok it makes sense thanks.

    In my second question with screenshot, I am not using updateonclose on higher TF. As you can see screen shot, the order should have been placed at where i placed a rend arrow because, lower TF condition was met and higher TF stochastic had also crossed. Looks like we are missing something here.

    The thing is I don’t wait for Daily Candle to Close to enter an order. Does pro real wait for daily close? I am not using updateon close. Does the screenshot look right according to the code?

    #108466

    You are looking at a chart with a candle already close but what happened during this candlestick? When did the cross occurred in the daily chart? You should use GRAPH in a backtest to inspect your condition.

    #108470

    I checked and it shows that it crossed at where the order was placed. And the first order was placed during the formation of that daily candle, so it seems to be accurate. Because of tiny pullbacks in hourly TF condition was not met until several candles down. So it looks fine. Thanks this clarifies lots of very important things

    Another thing i wanted to ask was – can we limit number of orders it places after being stopped out? I could not find proper thread for this. If you could point me to right place it would be great. I want only 1 order to be placed with a max of 2 tries. If it still gets stopped out, I want the strategy to stop executing more orders.

Viewing 6 posts - 16 through 21 (of 21 total)

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