Trying to use i_GetPlotValue and i_SetPlotValue and NoPlot(x) to plot calculated stop values from a strategy using a study. Have used trend lines within the strategy successfully but this is certainly not a straight forward way to do it and is calculation intensive.
I want to have the plot "noplot" between trades. Have tried many different ideas, but none work. The study will plot calculated stop value, but will not "noplot" between trades.
Simple study code:
If i_GetPlotValue(216) = 1 then
Plot6(i_GetPlotValue(215),"6")
else
NoPlot(Plot6);
i_GetPlotValue(216) is Market Position and
i_GetPlotValue(215) is plotted stop
Appreciate help with this.
Problem With Plotting from a Strategy to a Study [SOLVED]
-
- Posts: 22
- Joined: 24 Oct 2013
- Has thanked: 1 time
- Been thanked: 1 time
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Problem With Plotting from a Strategy to a Study
Please go to Wiki and read the NOPLOT usage example.::
but will not "noplot" between trades.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Problem With Plotting from a Strategy to a Study
ps.
Please see post #1 & #2
[FAQ] How to Post Codes (... so that people can read)
viewtopic.php?f=16&t=11713
Please see post #1 & #2
[FAQ] How to Post Codes (... so that people can read)
viewtopic.php?f=16&t=11713
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Problem With Plotting from a Strategy to a Study
GIGOTrying to use i_GetPlotValue and i_SetPlotValue and NoPlot(x) to plot calculated stop values from a strategy using a study. Have used trend lines within the strategy successfully but this is certainly not a straight forward way to do it and is calculation intensive.
I want to have the plot "noplot" between trades. Have tried many different ideas, but none work. The study will plot calculated stop value, but will not "noplot" between trades.
Simple study code:
If i_GetPlotValue(216) = 1 then
Plot6(i_GetPlotValue(215),"6")
else
NoPlot(Plot6);
i_GetPlotValue(216) is Market Position and
i_GetPlotValue(215) is plotted stop
Appreciate help with this.
Check the sending chart.
If the sending chart is sending "216" as "1",
then you will always have a plot.
-
- Posts: 22
- Joined: 24 Oct 2013
- Has thanked: 1 time
- Been thanked: 1 time
Re: Problem With Plotting from a Strategy to a Study
TJ
************
"Please go to Wiki and read the NOPLOT usage example."
I have done this.
*************
"Please see post #1 & #2
[FAQ] How to Post Codes (... so that people can read)
viewtopic.php?f=16&t=11713"
I will be more careful about this. I don't ask for help very often, so not know all the protocals for doing this.
****************
"Check the sending chart.
If the sending chart is sending "216" as "1",
then you will always have a plot."
I have done this;--strategy values transfer to the study.
*****************
During the trade, it appears the chart plots correctly during the trade but then when the market position= 0, the plot continues to draw with the values kind of drifting up or down and the plot does not turn off.
************
"Please go to Wiki and read the NOPLOT usage example."
I have done this.
*************
"Please see post #1 & #2
[FAQ] How to Post Codes (... so that people can read)
viewtopic.php?f=16&t=11713"
I will be more careful about this. I don't ask for help very often, so not know all the protocals for doing this.
****************
"Check the sending chart.
If the sending chart is sending "216" as "1",
then you will always have a plot."
I have done this;--strategy values transfer to the study.
*****************
During the trade, it appears the chart plots correctly during the trade but then when the market position= 0, the plot continues to draw with the values kind of drifting up or down and the plot does not turn off.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Problem With Plotting from a Strategy to a Study
Please show us what you have done.TJ
****************
"Check the sending chart.
If the sending chart is sending "216" as "1",
then you will always have a plot."
I have done this;--strategy values transfer to the study.
How could you know the proper values are transferred? and received?
debug print out?
Screen shot?*****************
During the trade, it appears the chart plots correctly during the trade but then when the market position= 0, the plot continues to draw with the values kind of drifting up or down and the plot does not turn off.
Where do you think is the problem?
-- the value?
or the plot/noplot?
-
- Posts: 22
- Joined: 24 Oct 2013
- Has thanked: 1 time
- Been thanked: 1 time
Re: Problem With Plotting from a Strategy to a Study
"Screen shot?
Where do you think is the problem?
-- the value?
or the plot/noplot?"
The problem is not with the values. I can get both values wanted from the strategy to the study; namely the marketposition and the value of the trailing stop. I can plot each of these in the study,so I know that part is working. The problem is with the plot/noplot.
I will try to get a screen shot to post.
Where do you think is the problem?
-- the value?
or the plot/noplot?"
The problem is not with the values. I can get both values wanted from the strategy to the study; namely the marketposition and the value of the trailing stop. I can plot each of these in the study,so I know that part is working. The problem is with the plot/noplot.
I will try to get a screen shot to post.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Problem With Plotting from a Strategy to a Study
Read my post #2 again."Screen shot?
Where do you think is the problem?
-- the value?
or the plot/noplot?"
The problem is not with the values. I can get both values wanted from the strategy to the study; namely the marketposition and the value of the trailing stop. I can plot each of these in the study,so I know that part is working. The problem is with the plot/noplot.
I will try to get a screen shot to post.
Read the wiki carefully, then compare the usage example to your syntax.
-
- Posts: 22
- Joined: 24 Oct 2013
- Has thanked: 1 time
- Been thanked: 1 time
Re: Problem With Plotting from a Strategy to a Study [SOLVED]
OK---I found the problem. When plotting with the study and using NoPlot, I had the plot style type set to LINE. This then was plotting a line between the end of one trade and the beginning of the next trade when NoPlot was active. Changing the plot style type to point removed the connecting line. While I think NoPlot should stop the line when NoPlot is active, the point style display is an OK solution.
Thanks for the help
Thanks for the help