MACD Trough / Peak Signal

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

    How to improve this code whose objective is to enter the market at the highest troughs or peaks of MACD and the RSI? Here is the sample code:

    CreuPic = 100 // to 300
    c1 = (MACDLine[C,L,Si](Close) <0) AND (MACDLine[C,L,Si](Close)> (- CreuPic))
    c12 = myRSI <10
    c13 = MACD[C,L,Si](Close)> 0
    IF c1 AND c12 THEN
    IF c13 THEN
    BUY 1 SHARES AT MARKET
    ENDIF
    ENDIF
    //
    c2 = (MACDLine[C,L,Si](Close)> 0) AND (MACDLine[C,L,Si](Close)> CreuPic)
    c22 = myRSI> 90
    c23 = MACD[C,L,Si](Close) <0
    IF c2 AND c22 THEN
    IF c23 THEN
    SELLSHORT 1 SHARES AT MARKET
    ENDIF
    ENDIF
    #166203 quote
    Nicolas
    Keymaster
    Master

    Please post screenshots of what you mean by “enter the market at the highest troughs or peaks of MACD and the RSI”, thanks.

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

MACD Trough / Peak Signal


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
macdopa @macdopa Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
4 years, 10 months ago.

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