Are guaranteed stops possible on this code?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #109544 quote
    Mike Boorman
    Participant
    Average

    Hello folks,

    Quick question:

    I’m aware that guaranteed stops cannot apply to the default trailing stop function in ProOrder, but could stops that have been manually coded (as per the below) become guaranteed stops if I ticked the option in ProOrder?

    Thanks for your help.

    DEFPARAM CumulateOrders = False 
    
    StartTime = 133000
    
    LimitEntryTime = 163000
    
    
    daysForbiddenEntry= OpenDayOfWeek=2 OR OpenDayOfWeek=3 OR OpenDayOfWeek=4 OR OpenDayOfWeek=5 OR OpenDayOfWeek=6 OR OpenDayOfWeek=0
    
    sl= 326
    slmove = 5
    
    indicator1 = SAR[0.02,0.02,0.2]
    c1 = (open > indicator1)
    indicator2 = Average[20](close)+std[20](close)
    c2 = (open > indicator2)
    indicator4 = BollingerDown[20](close)
    c3 = (indicator1 > indicator4)
    indicator5 = ExponentialAverage[13](close)
    indicator6 = ExponentialAverage[13](close)
    c5 = (indicator5 >= indicator6[1])
    indicator7 = ExponentialAverage[8](close)
    indicator8 = ExponentialAverage[8](close)
    c7 = (indicator7 >= indicator8[1])
    
    
    
    IF not onmarket and c2 and c1 and c3 and c5 and c7 and time >=StartTime and time <=LimitEntrytime and not daysForbiddenEntry THEN
    BUY 1 PERPOINT AT MARKET
    slprice = close - sl
    sell at slprice stop
    ENDIF
    
    c11 = (open < indicator1)
    indicator12 = Average[20](close)-std[20](close)
    c12 = (open < indicator12)
    indicator14 = BollingerUp[20](close)
    c13 = (indicator1 < indicator14)
    c15 = (indicator5 <= indicator6[1])
    c17 = (indicator7 <= indicator8[1])
    
    
    
    IF not onmarket and c12 and c11 and c13 and c15 and c17 and time >=StartTime and time <=LimitEntrytime and not daysForbiddenEntry THEN
    SELLSHORT 1 PERPOINT AT MARKET
    slprice = close + sl
    exitshort at slprice stop
    ENDIF
    
    if longonmarket and high - sl > slprice + slmove then
    slprice = high - sl
    endif
    
    if shortonmarket and low + sl < slprice - slmove then
    slprice = low + sl
    endif
    
    if onmarket then
    sell at slprice stop
    exitshort at slprice stop
    endif
    
    #109545 quote
    robertogozzi
    Moderator
    Master

    Please do not double post. I deleted your first topic.

    #109547 quote
    Mike Boorman
    Participant
    Average

    Well please can you ensure that your website doesn’t give the error message of “you are currently experiencing technical difficulties” when I click submit. This also happened to me yesterday. There is an issue with whatever is hosting this forum that somebody needs to fix.

    #109551 quote
    Vonasi
    Moderator
    Master

    please can you ensure that your website doesn’t give the error message

    Moderators do not own or maintain the website – they are just unpaid volunteers who sweep up the mess and ask members not to do it again to try to keep the forums as tidy as possible.

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

Are guaranteed stops possible on this code?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/07/2019
Status: Active
Attachments: No files
Logo Logo
Loading...