Help with errors in strategy

Forums ProRealTime English forum ProOrder support Help with errors in strategy

  • This topic has 2 replies, 3 voices, and was last updated 1 month ago by avatarJS.
Viewing 3 posts - 1 through 3 (of 3 total)
  • #244206

    Someone on X/Twitter has shared a good strategy, I am trying to implement it but there are errors generated.

    I’ve asked AI to convert it to code/txt from the image they shared. The strategy looks quite good, they’ve documented it in the post.

    https://x.com/AlgomaticTrade/status/1893249375758893545

    can anyone help / figure out why it’s not working?

     

    Here’s the converted code:

     

    #244211

    works for me

    2 users thanked author for this post.
    #244239
    JS

    • I have adjusted the conditions, can you see if you mean this…

    • // Checks if the closing price has been higher than the opening price for the last 3 candles
    • C1 = SUMMATION[3](close > open) = 3

    • // Checks if the highest BodyRatio in the last 3 candles is at least 0.7
    • C2 = HIGHEST[3](ABS(close – open) / (high – low)) >= 0.7

    • // Long signal when both conditions are met
    • LongSignal = C1 AND C2

    • // Sell signal when the closing price has been lower than the opening price for the last 3 candles
    • SellSignal = SUMMATION[3](close < open) = 3 • // Execution of buy and sell orders • IF LongSignal THEN • BUY contractsToTrade CONTRACT AT MARKET • ENDIF • IF SellSignal THEN • SELL contractsToTrade CONTRACT AT MARKET • ENDIF

    1 user thanked author for this post.
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