Indicator Signal not plotting

Questions about MultiCharts and user contributed studies.
masber2000
Posts: 29
Joined: 15 Aug 2012
Has thanked: 2 times

Indicator Signal not plotting

Postby masber2000 » 20 Jun 2022

In using the following code:

Code: Select all

if barstatus(1) = 2 then begin if (condition6 or condition10) and value14 = 0 then begin value14 = 1; setplotcolor(1,magenta); end; end;
This has randomly not plotted the signal multiple times in real-time, only to show the signal once the chart has been refreshed. I've checked the conditions and the code, the trigger logic is correct, it's just not plotting some (not all) signals in real-time.

Have you any idea why this is occurring?

Thank you,

mb2K

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Indicator Signal not plotting

Postby TJ » 20 Jun 2022

After you have enabled the setting, it will start to take effect at the next tick.
Since your logic is for the EOB, the setting will take effect at the next bar.

masber2000
Posts: 29
Joined: 15 Aug 2012
Has thanked: 2 times

Re: Indicator Signal not plotting

Postby masber2000 » 20 Jun 2022

Thank you TJ. Apologize for not understanding your logic here:

1. What setting are you referring to?
2. The procedure should be run on the last tick of the bar - and plotted as it has for roughly 49 of 50 signals. I could accept this if I didn't have proof of the signals being plotted correctly.
3. If the EOB logic you mentioned is correct, then we wouldn't be able to use the "this bar on close" entry.

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Indicator Signal not plotting

Postby TJ » 20 Jun 2022

Thank you TJ. Apologize for not understanding your logic here:

1. What setting are you referring to?
setplotcolor(1,magenta);

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Indicator Signal not plotting

Postby TJ » 20 Jun 2022

Thank you TJ. Apologize for not understanding your logic here:

. . .
2. The procedure should be run on the last tick of the bar - and plotted as it has for roughly 49 of 50 signals. I could accept this if I didn't have proof of the signals being plotted correctly.
3. If the EOB logic you mentioned is correct, then we wouldn't be able to use the "this bar on close" entry.
It depends on what type of plot you are making.

For anything that straddles two bars, eg a line plot, the setplot must go back one bar.

eg. setplotcolor[1](1,magenta);

masber2000
Posts: 29
Joined: 15 Aug 2012
Has thanked: 2 times

Re: Indicator Signal not plotting

Postby masber2000 » 20 Jun 2022

I'm plotting crosses, for which I need to plot on the same bar. The crosses change to the indicated color when conditions are met. In most instances, the crosses change color on the specified bar. On a few cases, the cross does not change to the signal color at all in real time. The signal only shows itself on the specified bar (indicated color) after I refresh the screen.

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Indicator Signal not plotting

Postby TJ » 20 Jun 2022

This is a coding issue.
The computer is dumb; it will only do what it is told.
You need to post your code.


Return to “MultiCharts”