Array size of each candle/bar in amibroker ? with working C code - AmiBroker | futures io social trading
futures io futures trading

Array size of each candle/bar in amibroker ? with working C code
Started: by fxtraders Views / Replies:245 / 0
Last Reply: Attachments:0

Welcome to futures io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Array size of each candle/bar in amibroker ? with working C code

  #1 (permalink)
Trading Apprentice
connaught, DL
Futures Experience: Intermediate
Platform: Ninjatrader,amibroker
Favorite Futures: future,currency
Posts: 11 since Sep 2016
Thanks: 1 given, 0 received

Array size of each candle/bar in amibroker ? with working C code

As you might know, amibroker is similar to C .. that's what I've been told ..

Below C code count number of digits.
C program that count size of array. 2 to <10 . .array size: 8
I've no idea , how to do it in amibroker ?even though it's similar to C , belowcode
is C program

#include <stdio.h>
    int main(){
    long n;
    int count = 0;
    int m[10],i;

    for( i = 2; i < 10 ; i++ )
        n /= 10;
        printf("m[%d]= %d\n",i+1,m[i]);


    printf("Counting number of digits: %d", count);

Output(click on link):

Below code need to get correct:
Solution suggested by X person:
You have to sum via VarSet/VarGet. That one is done in the nested loop. Then the result is called in second loop
you store the increment calculation to a table (either via varset/varget or matrix).
Then that table can be called from outside your nested loop.


Plot( C, ""+Interval(2), styleCandle );
for( i = 1; i <4 ; i++ )
   TimeFrameSet(i*in1Minute );
   rs = RSI(14);
   VarSet( "M"+ i, TimeFrameExpand( rs, i*in1Minute , expandPoint ) );
M = VarGet( "M" + i );

   for( b = 0; b < BarCount; b++ )
if(M[b] )   PlotText(" "+(i), b, L[b]-1-(i), colorAqua);
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );SetBarsRequired(-2,-2);

shape2 = 0;
shape3 = 0;
for( b = 0; b < BarCount; b++) {// visible chart area loop
getvar = ....;
    switch( getvar  ) {
        case 2: ....
        case 3: ....

            default: break;

PlotShapes( shape2 * shapeSmallCircle, colorWhite, 0, L, n*-35 );
PlotShapes( shape3 * shapeSmallCircle, colorYellow, 0, L, n*-35 );
Please register on to view futures trading content such as post attachment(s), image(s), and screenshot(s).


3x means 3 times ..
2x means 2 times ..
Yes , i haven't written all 2x and 3x ..

What do i need to add to make it work like upper picture?

Last edited by fxtraders; October 24th, 2016 at 07:13 AM.
Reply With Quote


futures io > > > > Array size of each candle/bar in amibroker ? with working C code

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

Market Analysis w/Dave Forss @ IQFeed

Apr 25

Introducing iSystems with Stage 5 Trading

Apr 27

*NEW* FIO Journal Challenge featuring NinjaTrader ($2,000+ of prizes)


Prototyping Python Strategies (part 2) w/Ran Aroussi

Elite only

Ask Me Anything w/Raymond Deux @ NinjaTrader

May 3

An Afternoon with FIO member Softsoap

Elite only

Machine Learning & Data Mining Bias w/Kris Longmore @ Robot Wealth

Elite only

Brannigan Barrett (TBA)

Elite only

FIO member Gomi (TBA)

Elite only

FuturesTrader71 (TBA)

Elite only

EasyLanguage Programming w/Chris @ ABC Trading Group

Elite only

Portfolio Diversification w/Brendon Delate

Elite only

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does Anyone Code Both Amibroker and TOS? Zephyr ThinkOrSwim Programming 5 December 7th, 2015 10:48 AM
Metastock to Amibroker Code rshor AmiBroker 2 July 16th, 2014 12:43 PM
Bar Score Over N Bars; Array Question aventeren NinjaTrader Programming 8 June 21st, 2013 01:40 PM
How do I determine what size range bar is comparable to a daily bar? Trankuility Traders Hideout 14 January 15th, 2012 10:46 AM
Candle size indicator PedroMAN NinjaTrader 4 August 14th, 2011 05:27 PM

All times are GMT -4. The time now is 10:28 AM.

no new posts
Page generated 2017-04-25 in 0.06 seconds with 19 queries on phoenix via your IP