Ichimoku using Tenkansen as stop

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11765 quote
    Dymjohn
    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
    Nicolas
    Keymaster
    Master

    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.

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 Nicolas
9 years, 5 months ago.

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