Comment on Pi Bridge for Amibroker

CHOKS commented on 20 Mar 2015, 01:07 PM

Hi Biju..

1. The Price shown in During Amibroker Scan is the Close Price of the Signal bar..(Always)

2. The Price shown in During Amibroker Back-test is may be any one of the Below
It depends on what settings u have in Back tester Settings under Trades Tab OR
U can control it in Formula level by Assigning BuyPrice / SellPrice / ShortPrice / CoverPrice

Close Price of The Signal Bar or
Open Price of The Signal Bar or
High Price of The Signal Bar or
Low Price of The Signal Bar or
Avg Price of The Signal Bar or

3. The Price U have in Nest/Pi is the Price at that time of Signal

To understand More easily..
Ur Database base interval is 1 min

Below is the sample 1min Data from 10:00:00 am to 10:09:59 am

AXISBANK,11-03-2015,10:09:00,589.65,590.25,589.1,589.65,23916 //Highest of the 10 min Bar
AXISBANK,11-03-2015,10:06:00,589.25,589.4,588.35,589.3,25061 //Lowest of the 10 min Bar

U r testing Ur Strategy in 10 min Chart interval

Suppose U get a Buy Signal at 10:03:59 am..

Ur Buy Order ‘ll be fired to Nest/Pi with price at 10:03:59 am i.e. 588.85 (See Above Quote)
So Ur Nest/Pi price ‘ll be 588.85..

Buy when U Scan …It ‘ll show only the Close price of the Signal Bar…in this case it is 10 min Bar..
Its Opening Price is Open price at 10:00:00 am i.e. 589.5
Its Closing Price is Close price at 10:09:59 am i.e. 589.65

Ur Scan price will be 589.65

Same way Ur backtest price also ..
If Ur afl has Buyprice variable
For example

BuyPrice = valuewhen(Buy,C); then backtest price ‘ll be 589.65 (Close Price of 10Min Bar)
BuyPrice = valuewhen(Buy,O); then backtest price ‘ll be 589.5 (Open Price of 10Min Bar)
BuyPrice = valuewhen(Buy,H); then backtest price ‘ll be 590.25 (High Price of 10Min Bar)
BuyPrice = valuewhen(Buy,L); then backtest price ‘ll be 588.35 (Low Price of 10Min Bar)

U can’t set the Price in Scan Bcoz it always show Close price of Signal Bar..
But in Backtest..If U want the Same price as it is in Nest ..U have code it accordingly..
Hope I explained it Clearly..

View the full comment thread »