I'm referring specifically to the code in red. I would like to instruct the code to do something else when the Buy Setup Count is equal to 9 and at the same time continue to do what it is still doing. Not having much joy with that. Can somebody please help?
Thanks.
Kay Wai
[FONT=Courier New][COLOR=#000000]if (CurrentBar < SetupBars*2) return;[/COLOR][/FONT]
[FONT=Courier New][COLOR=#000000] [/COLOR][/FONT]
[COLOR=#000000][FONT=Courier New]// Initiating Buy Setup[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New]if (Close[1]>Close[5] && Close[0]<Close[4])[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New] {[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New] priceflipdown = true;[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New] }[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New]// Initiating Sell Setup[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New]if (Close[1]<Close[5] && Close[0]<Close[4])[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New] {[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New] priceflipup = true;[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New] }[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New]// Starting Buy Setup Count[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New]if ((priceflipdown == true) && (Close[0]<Close[4]))[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New] {[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New] BuySetupCount++;[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New] this.TDBuySetupDrawText(BuySetupCount.ToString());[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New] }[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New]// Buy Setup Cancellation[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New]else if ((priceflipup == true) && (BuySetupCount < 9))[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New] {[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New] this.RemoveBuySetup();[/FONT][/COLOR]
[COLOR=#000000][FONT=Courier New] }[/FONT][/COLOR]
[FONT=Courier New][COLOR=red][B]// Buy Setup Completion[/B][/COLOR][/FONT]
[FONT=Courier New][COLOR=red][B]else if ((priceflipup == true) && (BuySetupCount >= 9))[/B][/COLOR][/FONT]
[FONT=Courier New][B][COLOR=red] {[/COLOR][/B][/FONT]
[B][COLOR=red][FONT=Courier New] [/FONT][FONT=Courier New]BuySetupCount = 0;[/FONT][/COLOR][/B]
[FONT=Courier New][B][COLOR=red] priceflipdown = false;[/COLOR][/B][/FONT]
[FONT=Courier New][B][COLOR=red] }[/COLOR][/B][/FONT]

Comment