Ichimoku using Tenkansen as stop

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11765 quote
    DymjohnDymjohn
    Participant
    Senior

    Hi

    Seem to be unable to fathom this one out can anyone help? The following is stopping me out on the same candle as entry I’m sure its something simple and the code could be simplified:-

    // first stops
    if longonmarket THEN
    DIFF = (close-Tenkansen)*pointsize
    sl = (close-Tenkansen)*pointsize
    set stop ploss sl
    endif
    if shortonmarket THEN
    DIFF = (tenkansen-close)*pointsize
    sl = (tenkansen-close)*pointsize
    set stop ploss sl
    endif
    // dynamic change of stops
    if longonmarket then
    dynamicsl = sl
    if (DIFF > dynamicsl) then
    dynamicsl = DIFF
    endif
    endif
    if shortonmarket then
    dynamicsl = sl
    if (DIFF > dynamicsl) then
    dynamicsl = DIFF
    endif
    endif
    #11809 quote
    NicolasNicolas
    Keymaster
    Legend

    I wrote a blog post about how to use an indicator value for an order stoploss. I think this is what you need for your project :

    http://www.prorealcode.com/blog/learning/moving-stoploss-dynamic-informations-proorder/

Viewing 2 posts - 1 through 2 (of 2 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

Ichimoku using Tenkansen as stop


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Dymjohn @dymjohn Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by NicolasNicolas
10 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 08/16/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...