Place orders when a curve change colour

Forums ProRealTime English forum ProOrder support Place orders when a curve change colour

  • This topic has 14 replies, 2 voices, and was last updated 7 years ago by avatarDave.
Viewing 15 posts - 1 through 15 (of 15 total)
  • #19774

    Hi Robert123/nicolas,

    Is it then possible to place an order if the MA has changed colour?

    Dave

    #19775

    @Dave
    Yes of course, because there are conditions that make the curve change its colour, so you’ll use these conditions values instead of the colour changing itself.
    In my example in this post, I use 2 conditions named “bullish” and “bearish”, you have to define them first, what is your definition of a bullish trend that make change the color of the curve?

    #19780

    My thought were around it placing a small order each time the MA changes colour/direction in agreement with that of a slower MA.

    #19786

    Ok, but what cause the moving average to change its colour? 🙂

    #19865

    Nicolas, apologies for the delay, Moving average changes colour because average price of ‘x’ periods is increasing (bullish) as each candle candle forms.

    #19898

    FYI, I moved your request to a fresh new topic in the appropriate part of the forum.

    So, about your trading strategy, it can be coded like this (bullish side only):

    With this code, the trade is not closed with a bearish signal (from green to red), but only with takeprofit or stoploss. But this is a good start to improve the strategy.

     

    #19931

    Thanks Nicolas, I will do my best to apply it to a couple of ideas I have when I’m back at my desk.

    Dave

    #19969

    I dropped it on todays dax 15 chart and it took four nice trades (sl/tp reduced to 20 to see more triggers) ,could you clarify simply what line 8 means (I’m still only at ‘assisted creation’ level in logic terms!!  🙂   ), is this the reason the order is placed on the third candle after the ma has changed colour or does the indicator paint this back as it calculates?.

    regards

    Dave

    #19976

    The line 8 is the signal condition that trigger a long trade. Trades are opened at the open of the next candle that found the pattern.

    #19980

    It’s the braketed ma[1]& [2] part I’m struggling with?

    #19981

    It refers to the moving average ‘MA’ variable defined at line 5 and offset back with 1 or 2 candlesticks before the current one.

    #19982

    Thanks Nicolas, that’s what I guessed it was. Your patience is much appreciated.

    #21522

    Ok Nicolas, So if I understand correctly the line says bullish = ma greater than 1 period back and ma 1 period back is less than 2 periods back because at that point it was decreasing or bearish?.

    You know where I’m going with this my friend, So if the ma was bullish turning bearish the the code should read :-

    bearish = ma<ma[1] and ma[1]>ma[2]

    #21525

    Yes, this is the correct syntax for a new bearish reversal. Well done 🙂

    #23373

    OK, so here is a simple complete program with buy and sell conditions.It simply looks for a fast ma above a slow ma and places an order when the fast ma changes direction in agreement with slow ma.any ideas on improvements/filters/ma combinations etc most welcome.

    dave

     

    1 user thanked author for this post.
Viewing 15 posts - 1 through 15 (of 15 total)

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