Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I am currently trying to learn Tradestation's EasyLanguage and have come across an error ("this plot has been defined using a different name") that I cannot resolve no matter what I try...
Thanks in advance
Can you help answer these questions from other members on NexusFi?
PlotPaintBar will automatically receive Plot1 to Plot4 (or to Plot2 in case you only specify two parameters for BarHigh, BarLow, BarOpen, BarClose). This results in your code using Plot1 twice and the easiest fix would be to use a different plot number for your current Plot1 (for example Plot5).
Thank you for your reply. I really appreciate your assistance...
I incorporated the changes you specified and it did solve the issue. The code compiled successfully. Unfortunately, the study paints all the bars yellow instead of just the bars where VT = 0...
you are welcome. Your code doesn't use any alternative colors and once "VT = 0" is fulfilled the variable ColorToUse will be set to yellow and as you use this for the bar colors all future bars will be yellow.
Depending on your preferences you could for example change the value in ColorToUse to an alternative color in case VT is different than 0.
another approach could be to include the paint bar plotting within your condition to only plot the bars that match your criteria.
if VT = 0 then
begin
ColorToUse = Yellow ;
PlotPaintBar( High, Low, Open, Close, "VT" , ColorToUse ) ;
End
else //unpaint the bar if the criteria is no longer true
begin
NoPlot( 1 ) ;
NoPlot( 2 ) ;
NoPlot( 3 ) ;
NoPlot( 4 ) ;
end ;