| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #1 | ||
![]() | Debugging Questions... Phantom Alerts... I have a simple show me indicator that checks for the bar to be an inside bar and then checks to see if it closed up or down through 78.6% of the candle. If so, plot a dot and alert me... Heres the code... Code: //Plot for shorts
if High[1] < High[2] and Low[1] > Low[2] then
begin
//This Calcs the Fib Retracement
Step1S = High - Low;
Step2S = Step1S*.214;
Step3S = Low + Step2S;
if Close < Step3S then //If the bar closes below the 78.6% retracment, print a dot and alert.
Plot5(Step3S, "IB FO S 78.6", IBShortColor );
Alert("IB FO S 78.6");
end
else
NoPlot( 5 ); Here is the instance for regular bars... Code: //Plot after a fakeout for shorts
if High[1] < High[2] and Low[1] > Low[2] then
begin
Plot3( Close, "IB Fakeout S", IBShortColor );
Alert("IB Fakeout S");
end
else
NoPlot( 3 ); ![]() ![]() Anyone got any ideas on what stupid thing i'm missing? It can't be much but it sure as hell is driving me up the wall. I'm probably staring right at it. I need a new fresh set of eyes. Thanks for your help gents as always! | ||
| |
|
| | #2 | ||
![]() | Re: Debugging Questions... Phantom Alerts... Code: //Plot for shorts
if High[1] < High[2] and Low[1] > Low[2] then
begin
//This Calcs the Fib Retracement
Step1S = High - Low;
Step2S = Step1S*.214;
Step3S = Low + Step2S;
if Close < Step3S then //If the bar closes below the 78.6% retracment, print a dot and alert.
BEGIN {<---- add this}
Plot5(Step3S, "IB FO S 78.6", IBShortColor );
Alert("IB FO S 78.6");
end
else
NoPlot( 5 );
END; {<---- add this} | ||
| |
|
| The Following User Says Thank You to Tams For This Useful Post: | ||
daedalus (06-25-2009) | ||
| | #3 | ||
![]() | Re: Debugging Questions... Phantom Alerts... Can I ask what was the logic flaw? Every if statement needs a separate begin and end statement? | ||
| |
|
| | #4 | ||
![]() | Re: Debugging Questions... Phantom Alerts... The best way to make sure they match is to indent all the codes within a BEGIN/END pair. Last edited by Tams; 06-25-2009 at 11:24 AM. | ||
| |
|
| The Following User Says Thank You to Tams For This Useful Post: | ||
daedalus (06-25-2009) | ||
![]() |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tradestation alerts | ryounkin | Technical Analysis | 5 | 01-17-2010 12:55 PM |
| I Want Alerts Based on Specific Parameters? | Johnson S. Mcdermott | Trading and the Markets | 5 | 06-08-2009 04:39 PM |
| Quote Tracker Paintbar Alerts? | cbratton | Tools of the Trade | 0 | 01-08-2009 06:31 PM |
| Phantom of the Pits | weiwei | Books | 15 | 06-26-2008 07:56 PM |
| Questions | zhao77 | Tools of the Trade | 2 | 02-14-2008 05:42 AM |