code to sell close to high

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #98191 quote
    ramarama
    Participant
    Senior
    DEFPARAM CumulateOrders = False
    cr=dhigh(0)-dlow(0)
    
    c1=Dhigh(0)-5
    c11=dhigh(0)-10
    
    c3=highest[400](high)-dhigh(0)
    x=.6
    if ( close[1]>=c11 and close[1]<=c1 ) and c3 and cr>=100 then
    sellshort 1 perpoint at close[1]-x stop
    endif
    
    set stop loss 12.5
    set target profit 200
    

    I am using the above code to sell when close price on 3 sec candle is between day high -5 and day high -10 points . also I want to sell when price is going down from day high.  example

    day high is 14010

    I want to sell  anywhere between 14000 and 14005 also when price is going down from 14010

    the code worked and placed one order ( I see it is magic ) after one order it did place any further though the conditions matched

Viewing 1 post (of 1 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

code to sell close to high


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
rama @rama Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/10/2019
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...