Change positon after stop loss

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

    Hi!

    Is there any way of  programming the system to change position from long to short and vice versa after a stop loss?

    /Mats

    #164636 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    There you go:

    If StrategyProfit < StrategyProfit[1] then
       If LongOnMarket[1] then
          Sellshort at Market
       Else
          Buy at Market
       Endif
    Endif
    mats6270 and thanked this post
    #164637 quote
    mats6270mats6270
    Participant
    Junior

    Thanks a lot!

    /Mats

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Change positon after stop loss


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
mats6270 @mats6270 Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/19/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...