Comment on Pi Bridge for Amibroker

CHOKS commented on 26 Jan 2015, 06:01 PM

Hi Billa,
This is bcoz of Ur AFL.The Ami Chart is refreshed every sec,so that it re executes all the lines in ur AFL every Sec . As Long As the lastvalue or EndValue (BUY) or (SHORT) or (COVER) or (SELL) == 1, it’ll fire orders to PI Bridge.For Ex if chart time frame is 1min, & u got Buy signal at 10:55:06, the lastvalue(BUY) ‘ll remain 1 Until 10:55:59 & at 10:56:00 it’ll become zero.So ami ‘ll continuously fire Order from 10:55:06 to 10:55:59.

For that U hav two option;
One is make the RefNO Unique.
Ex;
BuyRef = StrFormat(Name()+”_Buy_” + Cum(Buy));
What’ll happen, as soon as the 1st buy signal fired at 10:55:06,it’ll be reflected in Pi Bridge and other signals ‘ll be rejected by the pi since other fired signals have same BuyRef & Finally U’ll hav only one order shown in Pi Bridge.

Option-II
Using StaticvargetText and StaticvarsetText
This method is very good.Bcoz it’ll fire only one signal & other signals are ignored by amibroker AFL itself.
Just post ur Ami Time Frame & I’ll post relevant code…..
Hopes this might hav solved ur Problem……..
Happy Trading

View the full comment thread »