| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #1 | ||
![]() | Plot Statement Issue If PlotSlow=True and Displace >= 0 or CurrentBar > AbsValue( Displace ) then begin If Value2[2]<=Value2[1] and Value2>=Value2[1] then Plot6(Low-Offset,"Up") else if Value2[2]>Value2[1] and (Value2 < Value2[1]) then Plot7(High+Offset,"Dn") else NoPlot(6); I only want a single plot when the condition is true but I get plots most of the time. Where am I wrong here. Cannot see the forest for the trees sort of question. | ||
| |
|
| | #2 | ||
![]() | Re: Plot Statement Issue If PlotSlow=True and Displace >= 0 or CurrentBar > AbsValue( Displace ) then suggestion: use brackets to isolate multiple/complex Boolean logics. . Last edited by Tams; 08-02-2009 at 10:01 AM. | ||
| |
|
| | #3 | ||
![]() | Re: Plot Statement Issue My current issue relates an adaption of the jtHMA to have showme's plotted only when the the MA changes from up to down and vice versa. This code: "Displace >= 0 or CurrentBar > AbsValue( Displace ) then " was lifted directly from the jtHMA code. Commenting it out does not seem to change my output result one way or other, that I can see. I am getting plots above and below each bar rather than just on the bar where the MA changes from up to down and vice versa. I have attached a screenshot of my code and the output. | ||
| |
|
| | #4 | ||
![]() | Re: Plot Statement Issue | ||
| |
|
| | #5 | ||
![]() | Re: Plot Statement Issue If PlotSlow=True and Displace >= 0 or CurrentBar > AbsValue( Displace ) then begin If Value2[2]<=Value2[1] and Value2>=Value2[1] then Plot6(Low-Offset,"Up") {<--- this plots below} else if Value2[2]>Value2[1] and (Value2 < Value2[1]) then Plot7(High+Offset,"Dn") {<--- this plots above} else NoPlot(6); . Last edited by Tams; 08-02-2009 at 10:11 PM. | ||
| |
|
| | #6 | ||
![]() | Re: Plot Statement Issue If PlotSlow=True and Displace >= 0 or CurrentBar > AbsValue( Displace ) then begin If (Value2[2]<=Value2[1] and Value2>=Value2[1] ) or (Value2[2]>Value2[1] and (Value2 < Value2[1])) then Plot7(High+Offset,"Dn") else NoPlot(6); | ||
| |
|
| | #7 | ||
![]() | Re: Plot Statement Issue I copied your code but the result is unchanged. | ||
| |
|
![]() |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is the Difference Between IF and While Statement? | rajatheroyal | Automated Trading | 1 | 07-29-2009 01:31 AM |
| TradeStation Easy Language Reutrn Statement | tcyue1984 | Automated Trading | 2 | 05-27-2009 04:01 PM |
| Chat Issue | jonbig04 | Support Center | 5 | 05-06-2009 12:51 AM |
| Firefox Memory Issue | brownsfan019 | Tools of the Trade | 13 | 12-22-2008 02:40 PM |
| How to plot MP using IB data feed? | jj2005 | Market Profile | 0 | 03-14-2007 10:34 AM |