How to stop continuous Buy/Sell signal from PiBridge thru Amibroker?

Hi,
Your Static variable Part is Correct.
Is this Ur Full Code? Then
Just Ensure the following Settings in Amibroker.
Tools -->> Preferences -->> Intraday -->> Tick "Align Minute Bars to Regular Market Hours"
Tools -->> Preferences -->> Intraday -->> Select "Start Time Of Interval"
If The above settings are already there then
What U get in PI is not continuous order for a single signal instead U have multiple signal in Amibroker.
For that,
U Should use EXREM function to remove excess signals for repeated condition.
U should include the below code after line Short=Sell;
Buy = ExRem(Buy,Sell);
Short=Exrem(Short,Cover);
Note:-
Whenever U want to check AFL for Continuous order Firing for single signal using BarReplay,
Use Chart time interval greater than 1Minute.(5min is Recommended)
This is Bcoz, when U Bar Replay with 1min each bar will play for 1 Sec…so U always have one order per signal Bar.But in Live,Each bar will cover 60sec, so U may get continuous order in live.
If U use 5min interval in BarReplay,Each bar will play for 5Sec, So Ur AFL can be effectively checked for
continuous order firing for single Signal.