Absolute Stop Loss

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

    It looks to me like all the stop loss functions are relative to TradePrice.

    Is there a way or a code pattern that I can set an absolute stop loss?

    Ideally something like

    SET STOP LOSS sma(35)

    or

    SET STOP LOSS 18364.4

     

    I’ve tried     SET STOP LOSS ( TradePrice – sma(35) )

     

    but doesn’t work when the stop level is in profit.

    #43325 quote
    Despair
    Blocked
    Master
    sl=sma(35)
    if longonmarket then
      sell at sl stop
    elsif shortonmarket then
      exitshort at sl stop
    endif
    

    Here you go.

    #43329 quote
    Nicolas
    Keymaster
    Master

    A complete tutorial to create a stoploss with indicators

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

Absolute Stop Loss


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
mikenew @mikenew Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by Nicolas
8 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/17/2017
Status: Active
Attachments: No files
Logo Logo
Loading...