macd lines cross over not working

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #161578 quote
    kevin12345kevin12345
    Participant
    Average

    hi,

    does anyone know what i am doing wrong? no position is being opened.

    indicator1 = MACDline[12,26,9](close)
    indicator2 = MACDSignal[12,26,9](close)
    c1 = (indicator1 CROSSES OVER indicator2)
    IF NOT LongOnMarket AND c1 THEN
    BUY 1 CONTRACTS AT MARKET
    ENDIF

    thank you

    #161599 quote
    NicolasNicolas
    Keymaster
    Legend

    It works for me, it opens 1 position that last forever since there is no takeprofit or stoploss.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

macd lines cross over not working


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
kevin12345 @kevin12345 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by NicolasNicolas
5 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/16/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...