Australian (ASX) Stock Market Forum

Amibroker FAQ

I back tested strategy on CFD DAX with 1 contract. The spread was around 1 point and commission around 1 point. I was thinking if below setting is valid:
Code:
SetOption("CommissionMode",3); // % per trade / Euro per trade/ Euro per contract
SetOption("CommissionAmount",2.00);

Thanks.
 
I back tested strategy on CFD DAX with 1 contract. The spread was around 1 point and commission around 1 point. I was thinking if below setting is valid:
Code:
SetOption("CommissionMode",3); // % per trade / Euro per trade/ Euro per contract
SetOption("CommissionAmount",2.00);

Thanks.

Just interested how you got the data for that contract james?
 
Anyone think their test reports are being exported via a script in Amibroker? The test reports are stored in a folder and I don't know how secure that folder is from being accessed. Could be paranoid?
 
When we set commission e.g. 2 points, Amibroker presents in report 4 points. Someone knows if it's correct behavior that the value is always double?
 
When we set commission e.g. 2 points, Amibroker presents in report 4 points. Someone knows if it's correct behavior that the value is always double?

You are aware that you do an entry trade and an exit trade, aren't you?
Each one representing half turn. Half turn + half turn = round turn.
So if your round turn commissions are 2 then set comm./trade to 1.
Now the final question is whether it is elementary school math or math which only Einstein could have solved? If the latter case should be true then we would have a big problem. Houston?
 
You are aware that you do an entry trade and an exit trade, aren't you?
Each one representing half turn. Half turn + half turn = round turn.
So if your round turn commissions are 2 then set comm./trade to 1.
Now the final question is whether it is elementary school math or math which only Einstein could have solved? If the latter case should be true then we would have a big problem. Houston?

You didn't understand me. On OTC (unregulated market) e.g. for forex and some CFDs we pay for spread and commission for opening position. There is no round commission (for opening + for closing). So as I can see commissions in AmiBroker are hard-coded to be always double to what we set because this program is mainly dedicated to regulated market. But of course I can be wrong and please correct me :)
 
Yes you are wrong. You can always use code level for everything if you don't wanna use commission settings in backtest settings or via SetOption() function.


Example of slippage


Code:
SetOption( "PriceBoundChecking", False ); // to exceed bar high/low

BuyPrice += Slippage; // add slippage to entries
SellPrice -= Slippage; // subtract slippage from exits
ShortPrice -= Slippage;
CoverPrice += Slippage;


You may use CBT ( custom backtester)

Code:
SetOption( "PriceBoundChecking", False ); // make sure that AB will NOT trim at high/low

Slippage = ....;

if( Status( "action" ) == actionPortfolio ) {
    bo = GetBacktesterObject();
    bo.PreProcess(); // Initialize backtester

    for( bar = 0; bar < BarCount; bar++ ) {
        for( sig = bo.GetFirstSignal( bar ); sig; sig = bo.GetNextSignal( bar ) ) {
            if ( sig.isLong ) 
				sig.Price += IIf( sig.IsEntry(), Slippage, -Slippage );
			else
				sig.Price -= IIf( sig.IsEntry(), Slippage, -Slippage );
        }
        
        bo.ProcessTradeSignals( bar );
    }

    bo.PostProcess(); // Finalize backtester
}

and some other one....

Code:
if ( Name()== .... )
{
	slippage = ...;
        commission = ....;
        BuyPrice = (BuyPrice+TickSize*slippage) + (1/PointValue)*commission;
	SellPrice = (SellPrice-TickSize*slippage) - (1/PointValue)*commission;
	CoverPrice = (CoverPrice+TickSize*slippage) + (1/PointValue)*commission;
	ShortPrice = (ShortPrice-TickSize*slippage) - (1/PointValue)*commission;
} 
else if( Name() == ... ) {
 .....

etc.

etc.
 
And if you have bid price and ask price historical data then you can do it by using those ones for entry and exit.
 
Anyone think their test reports are being exported via a script in Amibroker? The test reports are stored in a folder and I don't know how secure that folder is from being accessed. Could be paranoid?

Afraid of NSA or what do you mean?

There is no data sent to AB servers at least.
You may use Wireshark for checking network traffic.
 
Anyone think their test reports are being exported via a script in Amibroker? The test reports are stored in a folder and I don't know how secure that folder is from being accessed. Could be paranoid?

If you are worrying about AmiBroker then block it on your fire-wall, if other user of your computer then grant proper access rights in Windows :)
 
You guys should rather worry about software like Metatrader or Multicharts which connect to their developer's servers (and where software doesn't even work if you are offline or if shop closed).

AB only connects to Internet if using streaming plugins or if using AmiQuote or if using IBcontroller or if you have some own or 3rd party code where you actively try to connect to some source. In all those cases the connection is established to 3rd parties but not to AB location itself.
 
I think the biggest concern is the brokers. They can scan through hudreds of thousands of accounts, and front run or piggyback the best of them. No one would know.

Imagine having access to some of IBs best individual accounts... $-printing machine.
 
I think the biggest concern is the brokers. They can scan through hudreds of thousands of accounts, and front run or piggyback the best of them. No one would know.

Imagine having access to some of IBs best individual accounts... $-printing machine.
On a consistent winning account the broker could study the entry/exit patterns to either sabotage or profit from.
 
Greetings of the day!

This is my first post on this site. I am very excited and happy to meet all you good people here.:)

Can Soembody help me with getting the Line numbers visible on the afl formula editor.

Thanks,
Neha
 
Greetings of the day!

This is my first post on this site. I am very excited and happy to meet all you good people here.:)

Can Soembody help me with getting the Line numbers visible on the afl formula editor.

Thanks,
Neha

Yeh sure I can help. Buy Amibroker rather than using a ripped copy.
 
Hi to all
I am writing a code .
but ,
I don't know , why my Code for Buy Stop order only work for 1 Day after and dont work for 2 Days or 3Day after,...
if you know my problem, please help me.

Thank you
Code:
BuyStop =  Ref(HHV(High,1),-1); 
Buy=Ref(Close,-1)<Ref(Open,-1) AND Cross(High,BuyStop);
BuyPrice=Max(BuyStop,Low);
  
Sell = MA(C,5)<Close;
Sell=ExRem(Sell,Buy);

RY.png
 
Top