Simple Coding Help - No Promise.

Hello Friends

I am starting this thread for helping anyone who requires small changes in AFLs or AFL coding done for small / simple requirements that can be clearly defined.

What does not go is conversion . . . from Amibroker to anything else . . . or from anything else to Amibroker . . .

Debugging requested for copy/paste AFLs, Please don't post huge AFLs with zillions of lines of code for debugging

I will not be available for any conversions and I am not interested in debugging some-one else's copy/pasted work and lastly . . .
Not interested in hacking/craking any ones work . . .

Only if have a clearly definable task to be coded I maybe able to help . . . No Promises but will try within my limitations . . .


As an example, recently one of our friends wanted a motivational message to be included in his Charts,
I enjoyed doing that, as i could easily empathize with why he wanted that . . .


Cheers

:) Happy
How does one contact u outside the forum, I want to get into advance AFL learning
 
Dear all,
while doing back-testing in amibroker i faced one problem kindly tell me any suggestion to overcome them.

problem.

Let us take the example of long
after the long conditions are met buy value is picked up by ami as close of that candle. (this is acceptable).

for selling this equity i have two sell orders. one limit sell order to book profit and other is stop loss sell order. (2% SL from the entry point and 4% profit target from the entry point)

but while doing the same in Ami after the sell conditions are met the program takes the close value of the candle.

Please guide how to solve this.
 

ocil

Well-Known Member
You can use % in buy and sell target. Do you have an idea how to add in backtesting or AFL?

Dear all,
while doing back-testing in amibroker i faced one problem kindly tell me any suggestion to overcome them.

problem.

Let us take the example of long
after the long conditions are met buy value is picked up by ami as close of that candle. (this is acceptable).

for selling this equity i have two sell orders. one limit sell order to book profit and other is stop loss sell order. (2% SL from the entry point and 4% profit target from the entry point)

but while doing the same in Ami after the sell conditions are met the program takes the close value of the candle.

Please guide how to solve this.
 
You can use % in buy and sell target. Do you have an idea how to add in backtesting or AFL?

Dear all,
while doing back-testing in amibroker i faced one problem kindly tell me any suggestion to overcome them.

problem.

Let us take the example of long
after the long conditions are met buy value is picked up by ami as close of that candle. (this is acceptable).

for selling this equity i have two sell orders. one limit sell order to book profit and other is stop loss sell order. (2% SL from the entry point and 4% profit target from the entry point)

but while doing the same in Ami after the sell conditions are met the program takes the close value of the candle.

Please guide how to solve this.
I did try to use % sl and %take profit in setting
But did not help

Can u expalin your suggestion in detail

Mukesh

Sent from my HUAWEI RIO-L01 using Tapatalk
 

ocil

Well-Known Member
use below code :-

lastpriceBuy = ValueWhen(Buy, Close);
lastpriceSell = ValueWhen(Sell, Close);
Profit = 4 ;
Loss = 2;
ApplyStop(stopTypeProfit, stopModePercent, Profit);
ApplyStop(stopTypeLoss, stopModePercent, Loss);
 
Hi

Needed help in an afl
I have 4 values naming V1,V2,V3,V4

Needed to find highest of the 4 values and the lowest of the 4 values..

tried using max(v1,v2)..
It shows correct but only for 2 values namely v1 and v2

Any way to find the highest and lowest of the 4 values ?

Help much appreciated...Thanks
 

onequorauser

Well-Known Member
Hi All,

I am trying to analyse my past trades.

For that I need to mark all my trades for post facto . Can someone please help me with a code that allows me to upload an excel or csv which would mark my trades with a short horizontal line of different colors for buy and sell.

I have a data feed that plots the data in Ami so I only need the trade marking

Input parameter = Date(DD/MM/YYY), Time(HH:MM:SS), Scrip,Price, Qty, Buy/Sell
Output = Line marking B/S with Qty mentioned along side

Please see the example below:

View attachment 26342


View attachment 26340


Please let me know in case any additional information is required or if something of this sort is readily available
Hi All,

I was wondering if anyone can help on this. Also in case this is tedious or not feasible, I would appreciate it if someone can suggest an alternate solution
 

Similar threads