Ten Minutes to Close Daily Dow

Forums ProRealTime English forum ProOrder support Ten Minutes to Close Daily Dow

Viewing 8 posts - 1 through 8 (of 8 total)
  • #202679

    Hi I have been coding the following strategy to read the 10th last 1min candle of the Real Trading Hours in the Dow and to then take a scalp trade to the close if that candle also shows more Momentum than its preceding candles.

    However my code did not result in a long trade on Friday as I expected it to. SO it seems my code is not successful in classifying the 20h50 (UK Time candle) as a Bull candle.

    Can someone please assist me with what I am doing wrong?

    Here is the code

     

    #202687

    Are you running on a 1 min (or less) Timeframe?  You need to to detect a Time of 205100.

    #202690

    Your average range in line 8 doesn’t feel right, you probably forgot amplitude10 in it because you divide by 4 (or if you did want just these 3 values used then the /4 would be /3 ). It subsequently impacts lines 23 and 24 to have trigger true or not, which impacts lines 34 and 35 for a long trade.

    #202691

    Yes I am running on 1minute and the reading of the candle was set to 205100 as you recommended but it traded short instead of long.

    #202692

    Also, you never set doji, bull and bear to zero, so if they have been true once in history, then remain true ever after, instead of “becoming” true only at relevant 205100’s, so impacts on lines 34 and 40

    #202696

    Eventually, even if averagerange is fixed and bear, bull, doji are reset to 0 each day, the trade for friday should remain short as if I read the relevant candle from my timezone, open is 29663.7 and close is lower by more than 5 at 29649.2, so bear=1 bull=0 for it.

    Edit: doh, read the wrong candle, forget text striked through

     

     

    #202698

    You can use the graph command added at end of code to see what’s going on in more details, and reading (this time) the right candle translated into my timezone, it seems “trigger” is the one not true for friday night preventing the trade.

     

    #202704

    Thank you very much.

    It is working now except for the average error. I have corrected this now to below. I will run it for a bit and see if it is robust.

    Good learning for me and thank you again for taking the time to help and teach me a bit more functions.

    If Time = 205100 Then
    Amplitude10 = Range[0]
    Amplitude11 = Range[1]
    Amplitude12 = Range[2]
    Amplitude13 = Range[3]
    Amplitude14 = Range[4]
    AverageRange = (Amplitude14+Amplitude11+Amplitude12+Amplitude13)/4

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

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