Error codeing MACD crossover happens with 26 & 52 period EMA

Forums ProRealTime English forum ProOrder support Error codeing MACD crossover happens with 26 & 52 period EMA

Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • #140161

    Hi ,

    I am new to PRorealtime. Thank you GURU’s for reading the topic.

    I am trying to build a code where in when MACD crossover happens with 26 & 52 period EMA.

    The above code is not setting up the Stop loss & targets. The stop loss should be lowest of last three candles when going long & highest when shorting.

    Also i notice that order is place after 2 candles are formed delaying the entry of the order.

    Can anyone help what is wrong in the code.

     

    #140164
    • Give your topic a meaningful title.Describe your question or your subject in your title. Do not use meaningless titles such as ‘Coding Help Needed’.
    • Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read.

    Thank you 🙂

    #140168

    SET STOP LOSS and SET TARGET PROFIT require a difference between prices (Close – Low), not a price (Low).

    Replace lines 16-19  as follows:

    do the same for the Short side using HIGHEST.

    Do not use $ for PROFIT, it’s intended for currency values, such as 400 etc…

     

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

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