break out l on high and low

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #39317 quote
    enzo_52
    Participant
    Senior

     

    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    
    
    hig = high
    lo=low
    
    myid4high = hig<high[3] and hig[1]<high[3] and hig[2]<high[3]
    
    myid4low =lo>low[3] and lo[1]> low[3] and lo[2]>low[3]
    
    myID4= myid4high and myid4low
    

    this is the code of inside  like you can see on pic, so i want to go short at break out of low of thirth candelstick ( the candelstick that has the  lowest of 4 candlesticks (line red)

    can you help me, please

    thanks

    break.png break.png
    #39454 quote
    enzo_52
    Participant
    Senior

    any suggestion?

    #39465 quote
    JC_Bywan
    Moderator
    Master

    Keywords like “cumulateorders”, “buy”, “sell” only work for probacktest/proorder, not for probuilder limited to indicators programming, so we move this topic from “pro-builder” forum to “pro-order” forum, where it has more chances to attract suggestions from others users working on trading strategies too.

    #39501 quote
    Nicolas
    Keymaster
    Master

    You can give a try with this code:

    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    
    
    hig = high
    lo=low
    
    myid4high = hig<high[3] and hig[1]<high[3] and hig[2]<high[3]
    
    myid4low =lo>low[3] and lo[1]> low[3] and lo[2]>low[3]
    
    myID4= myid4high and myid4low
    
    if myID4 then 
     BUY 1 CONTRACT AT highest[4](high) stop
     SELLSHORT 1 CONTRACT AT lowest[4](low) stop
    endif
    #39669 quote
    enzo_52
    Participant
    Senior

    Thanks so much  Nicolas

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

break out l on high and low


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
enzo_52 @enzo_52 Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by enzo_52
8 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/28/2017
Status: Active
Attachments: 1 files
Logo Logo
Loading...