Plotting Text above/below bar where signal occurs

Questions about MultiCharts and user contributed studies.
AdrianP
Posts: 30
Joined: 02 Sep 2014
Has thanked: 2 times
Been thanked: 1 time

Plotting Text above/below bar where signal occurs

Postby AdrianP » 13 Dec 2018

Hi,

I have huge problems with the whole test plotting thing. I'm hoping someone can be generous enough to provide some insight for my current situation.

All I wish to do, is plot above the bar (for a sell) a number which represents the difference between the close and my stop level.
So I can instantly see the numbers of pips/ticks at risk etc.

Currently I simply have a DOT appearing above the bar when a setup occurs, with the risk number plotting in the data window only.
How do I replace that with a test number or place it above the dot?

Thanks in advance.

User avatar
TJ
Posts: 7150
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 987 times
Been thanked: 2040 times

Re: Plotting Text above/below bar where signal occurs

Postby TJ » 13 Dec 2018

You can use the keyword:

TEXT_NEW


There are coding syntax examples in the wiki.

AdrianP
Posts: 30
Joined: 02 Sep 2014
Has thanked: 2 times
Been thanked: 1 time

Re: Plotting Text above/below bar where signal occurs

Postby AdrianP » 13 Dec 2018

Here's what I have come up with so far, but there are problems.

Value1 = Text_New(Date,Time,High, NumtoStr(My Formula,1));

If Condition1 then begin
Text_SetColor(Value1, White);
Text_SetStyle(Value1,2,1);
end;

2 problems. It is plotting on almost every bar rather than when my condition is met.
And it is plotting 3 vertical values instead of one, with the correct value in white and 2 other value in cyan?

Also, should this work correctly on Tick,Range and Renko bars?
Attachments
2018-12-13_22-36-56.png
2018-12-13_22-36-56.png (5.95 KiB) Viewed 213 times

User avatar
TJ
Posts: 7150
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 987 times
Been thanked: 2040 times

Re: Plotting Text above/below bar where signal occurs

Postby TJ » 13 Dec 2018

See post #1 & #2
viewtopic.php?t=11713


Return to “MultiCharts”