im brand new/virginal to amibroker language
(tho an old excel and TS whore),
can anyone help me showing how buy and sell orders look like in AFL?
say for instance:

- given a setup (let's call it setup1)
- buy 10% below yesterday's close
- sell (exit) at close OR at 10% stop from entry

could it be:

buyprice = min ( open , ref(close,-1)*0.9 );
sellprice = iif ( low < ref(close,-1)*0.9*0.9 , ( ref(close,-1)*0.9*0.9 ) , 
close );

buy = setup1;
sell = BarsSince(Buy)==0;




Reply via email to