Questions tagged [amibroker]

Amibroker is a financial software for portfolio-level system design, testing and validation. It has its own scripting language AFL.

75 questions
0
votes
1 answer

Time column and DateTime Format (DateTime object vs String Object)

How can I change the time without turning it into a string object (which dt.strftime does)? Like if I want to turn (default time format and time object)%H:%M:%S into %I:%M:%S %p or turn %H:%M:99(Default under time column in csv file data) into…
Jitin
  • 1
  • 1
0
votes
1 answer

How to put end date in Amibroker column

I am running a simple exploration in Amibroker wherein I put a 21 day range in the date range window in Analysis window; like 01-01-2023 to 21-01-2023. I then run the exploration to find "Buy" stocks. In the afl I have this code to pull the closing…
pradeep
  • 13
  • 7
0
votes
0 answers

Get intraday first candle Open Interest and Current open interest

I wrote a simple Amibroker AFL exploration code to get today's OI at Today's start and OI at current price and calculate their difference. The current price is getting correct value but not the value at todays start. Here is the…
0
votes
0 answers

Custom "NOGAP" and "Start over a new Session" function required for TradingView Pine script

Based on my observation over last few years, I have come to realize that many correct trade entry related issues can be solved by two custom functions. One, "NOGAP" - if I can code a function that doesn't take any price gap opening into…
0
votes
0 answers

Fix required for Jurik Moving Average AmiBroker Formula Language

function JurikMA(src, length, phase, power) { src = (High + Low + Close)/3; phaseRatio = IIf(phase < -100, 0.5, IIf(phase > 100, 2.5, (phase / 100) + 1.5)); beta = 0.45 * (length - 1) / (0.45 * (length - 1) + 2); alpha = beta ^ power; jma = 0.0; e0…
0
votes
0 answers

Require AmiBroker alternative built-in variable for barstate.isconfirmed pine script

A set of built-in variables in the barstate namespace allow your script to detect different properties of the bar on which the script is currently executing. One of them is barstate.isconfirmed. barstate.isconfirmed is true on all historical bars…
0
votes
0 answers

How to filter out signal repetition when you are using IIF(BUY,,) condition on a 5 min chart since Buy is true for each tick in 5 min candle

I've created an AFL script that sends Buy, Stoploss, and Target values directly to my telegram with the help of a telegram bot. I've made it call the telegram sender function when the buy is true. But the problem is that since buy will be true for a…
Asker
  • 3
  • 3
0
votes
1 answer

What is the equivalent function in AmiBroker AFL for "ta.change" in TradingView Pine-Script?

I need to know the function from AmiBroker AFL which serves the same purpose as "ta.change" from TradingView Pine Script. "ta.change" Compares the current source value to its value length bars ago and returns the difference between the values when…
0
votes
0 answers

Syntax Error Fix Required for the (Updated) Filtered Connors RSI in AFL AmiBroker

Here is the updated AFL for "Filtered Connors RSI" - _SECTION_BEGIN("Filtered Connors RSI Final"); ma_length = Param("MA Length", 14, 3, 100); c_length = Param("C Length", 3, 1, 100); ud_length = Param("UD Length", 2, 1, 100); roc_length =…
0
votes
0 answers

Fix required for Ehlers Roofing Filter in AFL

I am trying to code "Ehlers Roofing Filter" in AFL, and having an error. The code is as follows - _SECTION_BEGIN("Ehlers Roofing Filter"); function erf(x, t_hp, t_lp) { omega1 = 4*sin(1)/t_hp; omega2 = 4*sin(1)/t_lp; alpha =…
0
votes
1 answer

Syntax Error Fix Required for Filtered CRSI AFL

I am new to AmiBroker platform, and trying to code my preferred tools that I use in TradingView. One of those tools is "Filtered Connors RSI". It's an accurate indicator, particularly for trending market condition. I am trying to code it in AFL in…
0
votes
0 answers

How to use chartlink scanner?

How to use chartlink scanner for the following condition: Price should be above 200 periods SMA Price should be close to 200 periods SMA Note: I want to use it for daily time frame
0
votes
0 answers

How to set the base of histogram to 50 in AmiBroker AFL?

How to set the base of histogram to 50 in AmiBroker AFL? Please let me know. Thanks and regards.
0
votes
0 answers

Code fix for Cumulative Volume Delta in AFL

I am trying to code ""Cumulative Volume Delta" in AFL. My code is as follows - _SECTION_BEGIN("Cumulative Volume Delta"); uw= IIf(C>O, H-C, H-O); lw= IIf(C>O, O-L, C-L); spread= (H-L); bl= (spread - (uw-lw)); puw= (uw/spread); plw=…
0
votes
0 answers

Fixing Plotting of Initial Balance Indicator in AmiBroker AFL

I am using the following AFL code for "Initial Balance with Range Extension" in AmiBroker - _SECTION_BEGIN("Initial Balance with Range Extensions"); P11 = Param("IB Start Time",091500, 0 , 235959, 1 ) ; P12 = Param("IB END Time",101500, 0…