Check of previous candles

Forums ProRealTime English forum ProOrder support Check of previous candles

  • This topic has 31 replies, 3 voices, and was last updated 5 years ago by avatarMarc.
Viewing 15 posts - 1 through 15 (of 32 total)
  • #75916

    Hi together,

    I need some help regarding checking of previous candles in different periods.

    I’m working with a trend following systems which cheks if the previuos months open is higher or lower. Than it checks if the last months candle is higher or lower.

    If previous moth and previous week candles are in the same direction than the systems checks the previous days candle (except monday). If previous days candle is in the opposite direction of previos month and week than an order will be set either on the high or the low of previous days candle.
    Example:
    Month: bullish = open < close
    Week: bullish = open < close
    Day: bearish = open > close
    Set a buy order at high of bearish candle

    Month: bearish= open > close
    Week: bearish = open > close
    Day: bullish = open < close
    Set a sell order at low of bearish candle

    Each friday evening non executed orders will be deleted.
    Monday is not a trading day
    SL an TP are ATR(2)
    If sell /buy stop order is not filled within the next day and on the curent day the previous days candle is still in the opposite direction of compared monthly and weekly candle than buy stop and sell stop must be amended to previous days high / low.

    I hope that anyone can help me with this system. In my opninion this should generate good trades with mostly positive results.

     

    Thank you in advance
    Marc

     

    #76290

    Anybody there who can help?

    #76294

    Please do not duplicate posts in different topics and languages, this won’t help and will shatter replies among different topics making it more difficult to retrieve. Thank you.

    Which one do you prefer to keep, the english or german one?

    #76295


    I’m working with a trend following systems which checks if the previous month’s open is higher or lower. Then it checks if the last month’s candle is higher or lower.

    What do you mean with the BLUE sentence, shall OPEN be higher than…. what?

    What do you mean with the RED sentence, shall the …what?… of the CANDLE be higher/lower than… what again?

    #76559

    Ciao Roberto,

     

    I’d like to keep / collect all information in the english version.
    1st of all thank you for your reply.

    I made a mistake while describing the system in the first sentence. It should be read as follows:
    The System shall recognize if the previous months direction is bullish (close > open) or bearish (close < open). Afterwards the system shall recognize if the previous week is bullish (close > open) or bearish (close < open). If both previous monthly and weekly candle moves in the same direction (either both directions are bearish or bullish) then the system checks on tuesday if the monday candles direction is opposite (close < open) compared with monthly and weekly candle.

    This means if previous month and week are bullish than the rules set a pending order on high of mondays candle incl. slippage and spread (order must be set on tuesday because mondays candle hasn’t finished until this candle close due to change of date). If on Tuesday the order is not triggered, but the tuesdays candle also moves in the opposite direction of previous month and week candle the current pending order has to be amended to high of tuesdays candle and so on. If order was’t triggered within this week all pending orders will be deleted on Friday Evening.

    For bearish set up above rules must be used vice versa.
    Currently there is no TP and SL mentioned in the system which would be necessary if basic of this system works.

    I hope I clarified the rules of this system.

     

    Thank you in advance

    Marc

     

    #76636

    Try this code, I just run it to check syntax and if it opened any trades:

     

     

    #76650

    Hi Roberto,

    thank you very much for your help. I will try this code and hope that it will work the way I trade currently 🙂

    Rgds

    Marc

    #76651

    Cheers Roberto,

    I receive an information that in Line 3 word ‘monthly’ doesn’t work. Please see file attached

     

    #76653

    Hi Roberto,

    when hiding the hole code for timeframe monthly I receive the same issue for weekly and Daily.

    Rgds Marc

    #76654

    My system works perfectly, the attached screenshot is for DAX daily, but it works on any instrument.

    There must be an error in the first 2 lines.

    Did you import the file?

    #76662

    Are you trying to run it on PRT Live. With TIMEFRAME it will only currently work on demo platforms?

    #76669

    Hi Roberto I tried to import the file and it worked well, but I receive the same error when start testing

    #76671

    Ciao Vonasi,

    I use IG Markets with a Real Account and not a demo platform.

    This can be the reason.


    @roberto
    : Are you using a demo platform?

    Rgds
    Marc

    #76672

    Yes, it only works on demo accounts. You’ll have to wait a few months to be able to run it, then!

    I’ll work on trying to make it work on Real accounts, removing TIMEFRAME and using FOR…NEXT loops to scan past weeks and months, but I fear it’ll be a time-consuming code, if I can code it!

    I’ll let you know.

    #76673

    Hi Roberto,

     

    thank you very much for your help. I really appreciate it 🙂

    I’ll try my best on using it onb a demo account too

    Rgds
    Marc

Viewing 15 posts - 1 through 15 (of 32 total)

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