How to retrieve /capture/store prices at Buy and Sell signals

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #175582 quote
    jkadda
    Participant
    Average
    In the indicator below i want to be able to capture or store in a variable the prices at which the Buy and Sell are printed on the chart.
    See screenshot attached, i want to test the prices and compare before printing the next signals.
    MyLongConditions  = close CROSSES OVER  BollingerDOWN[20]
    MyShortConditions = close CROSSES UNDER BollingerUP[20]
    IF MyShortConditions THEN
       DrawText("Sell",barIndex, high + range*2,serif,bold,15) coloured(255,0,0,255)
    ELSIF MyLongConditions THEN
       DrawText("Buy",barIndex, low - range*2,serif,bold,15) coloured(0,128,0,135)
    ENDIF
    RETURN

     

    Buy_Sell_Signals.jpg Buy_Sell_Signals.jpg
    #175609 quote
    Nicolas
    Keymaster
    Master

    Save it into a variable:

    MyLongConditions  = close CROSSES OVER  BollingerDOWN[20]
    MyShortConditions = close CROSSES UNDER BollingerUP[20]
    IF MyShortConditions THEN
       DrawText("Sell",barIndex, high + range*2,serif,bold,15) coloured(255,0,0,255)
       buysignalprice = high+range*2 
    ELSIF MyLongConditions THEN
       DrawText("Buy",barIndex, low - range*2,serif,bold,15) coloured(0,128,0,135)
       sellsignalprice = low-range*2
    ENDIF
    RETURN
    #175641 quote
    robertogozzi
    Moderator
    Master

    @jkadda

    Do not double post. Ask your question only once and only in one forum. All double posts will be deleted anyway so posting the same question multiple times will just be wasting your own time and will not get you an answer any quicker. Double posting just creates confusion in the forums.

    #175667 quote
    jkadda
    Participant
    Average

    @ Nicolas

    Thanks very much.

    Appreciated.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

How to retrieve /capture/store prices at Buy and Sell signals


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
jkadda @jkadda Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by jkadda
4 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 08/17/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...