Tagging differnet exits?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #232078 quote
    Niklas87Niklas87
    Participant
    New

    Is ther a way to name/tagg different exits inside one stratergy?
    I have a stratergy i been working on for a few months and it now have 4-5 different exits for longs and the same for shorts, so when i backtesting its getting hard to find out what exit sold at what point.

    I know about LongTriggered/ShortTriggered and use them alot, but it would be amazing with a StopTriggered and TraillingStopTriggered too.
    Also a way  to be abel to see if exit1, exit2 or exit3 was triggered.

    Think i was trying with the Print function some time ago, but cant make it work.

    #232082 quote
    PeterStPeterSt
    Participant
    Master
    If cSell1 then
      Sell x1 Shares at Market  // Or just Sell at Market.
      GraphOnPrice Close as "Exit 1" Coloured("green")
    endif
    
    If cSell2 then
      Sell x2 Shares at Market  // Or just Sell at Market.
      GraphOnPrice Close as "Exit 2" Coloured("yellow")
    endif
    
    If cSell3 then
      Sell x3 Shares at Market  // Or just Sell at Market.
      GraphOnPrice Close as "Exit 1" Coloured("orange")
    endif

    That should do it. Watch for any of the coloured lines to change (vertical) position.

    Have fun !
    Peter

    robertogozzi thanked this post
    #232087 quote
    Niklas87Niklas87
    Participant
    New

    Thanks!

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

Tagging differnet exits?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Niklas87 @niklas87 Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/30/2024
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...