Help coding ADX strategy

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #144751 quote
    briac
    Participant
    Junior

    Hi, i am not able to code the following strategy:

    If ADX < 25  during 24 candles, then

    maximun = highest bollingerup during those 24 candles

    minimun = lowest bollingerdown during those 24 candles

    Set buy stop order at maximun

    Set sellshort order at minimun

    Thank you very much

    #144797 quote
    robertogozzi
    Moderator
    Master

    Not tested:

    Once BB = 20
    Once p  = 24
    MaxbbUP = highest[p](BollingerUp[BB](close))
    MinbbDN = lowest[p](BollingerDown[BB](close))
    MyAdx   = (summation[p](Adx[14]  < 25) = p)
    If MyAdx then
       Buy       1 contract at MaxbbUP Stop
       Sellshort 1 contract at MinbbDN Stop
    Endif
    #144836 quote
    briac
    Participant
    Junior

    ok, thank you very much

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

Help coding ADX strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
briac @briac Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by briac
5 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/19/2020
Status: Active
Attachments: No files
Logo Logo
Loading...