use of GRAPHONPRICE with a STOP %TRAILING

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #243068 quote
    oliTR
    Participant
    New

    Hello,

    is it possible to use GRAPHONPRICE with instruction such as  a STOP %TRAILING ?

    Thanks

    #243073 quote
    Iván González
    Moderator
    Master

    Hello. You should create a trail stop variable and from there you could even play with the transparency so that it only draws when you are inside the operation. Here is an example

    sma=average[50,0](close)
    // This will control the STOP LOSS transparency
    if not onmarket then
    transparency=0 //transparency
    else
    transparency=255
    endif
    // Long Trades
    if not onmarket and close crosses over sma then
    stopLoss=close-2*averagetruerange[14](close)
    targetProf=close+2*(-stopLoss+close)
    buy 1 contracts at market
    endif
    
    set stop price stopLoss
    set target price targetProf
    
    graphonprice stopLoss coloured(255,0,0,transparency)
    fifi743 and oliTR thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

use of GRAPHONPRICE with a STOP %TRAILING


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
oliTR @olitr Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Iván González
1 year, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/24/2025
Status: Active
Attachments: No files
Logo Logo
Loading...