Moving Averages to prevent unnecessary trades opening

Forums ProRealTime English forum ProOrder support Moving Averages to prevent unnecessary trades opening

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

    Hi There,

    I have been looking for code, I have been trying to code a 2 Moving Average as part of my trading system.

    50 Period Moving Average

    200 Period Moving Average

    when the 50 MA has crossed over on top of the 200 MA, then my trading system will only take  buy/long Trades

    and when the 200MA has crossed over on top of the 50, then the trading system will only take Sell/Short Trades

    I am trying to eliminate, the trading system from going against the trend and only taking Buy/Long trades when the market is on the up and Short/Sell trades when the Market is moving down.

    I would like to attach this code into an existing trading system.

     

     

    #181989

    There you go;

     

    1 user thanked author for this post.
    #181992

    Thank you

    Roberto

    #181997

    Hello again,

    So when I implement the code I get this message coming up:

    The Following variable is undefined: MyLongConditions, MyShortConditions

     

    Thanks again

    #181998

    MyLongConditions and MyShortConditions will be the existing conditions from the system you are adding this to.

    #181999

     

    #182000

     

    2 users thanked author for this post.
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