STOP LOSS TO MINIMIZE LOSSES

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #205914 quote
    OMXet
    Participant
    Junior

    Hi

    You all coders ;>)

    I want this to happen in sideways markets to minimize size of losses but my code skills are below par.

    // Stops and targets
    IF pPROFIT   =< 10
    THEN SET STOP pLOSS 0
    ENDIF

    SET STOP pLOSS 50
    SET TARGET pPROFIT 250

    #205932 quote
    JS
    Participant
    Senior

    Hi @OMXet

    Is it the intention that you measure the “Range” of the sideways movement and when it is too narrow / small that you then set your stop loss to zero …?

    #205933 quote
    OMXet
    Participant
    Junior

    Hi

    Noooo, I just want to SET STOP LOSS = 0 as fast as my profit is over 10 points!!!

    #205936 quote
    JS
    Participant
    Senior

    Hi @OMXet

    You can then use “Close-TradePrice” to see if your profit is larger than 10.
    Instead of “Set Stop pLoss 0” you can set the “Set Stop” to the level of the “TradePrice”… (BreakEven)

    If Close - TradePrice > 10 then
    Set Stop Price TradePrice
    Set Target pProfit 250
    Else
    Set Stop pLoss 50
    Set Target pProfit 250
    EndIf
    OMXet and Midlanddave thanked this post
    #206241 quote
    OMXet
    Participant
    Junior

    Thx JS

    Exactly what I was looking for ;>))

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

STOP LOSS TO MINIMIZE LOSSES


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
OMXet @omxet Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by OMXet
3 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 12/16/2022
Status: Active
Attachments: No files
Logo Logo
Loading...