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


Array size of each candle/bar in amibroker ? with working C code
Updated: Views / Replies:402 / 0
Created: by fxtraders Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

Reply
 
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

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

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

    }

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

Output(click on link): https://ideone.com/fP2boO

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
or
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.


 
Code

SetBarsRequired(-2,-2);
Plot( C, ""+Interval(2), styleCandle );
for( i = 1; i <4 ; i++ )
{
   TimeFrameSet(i*in1Minute );
   rs = RSI(14);
   TimeFrameRestore();
   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 futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


NEED OUTPUT LIKE UPPER PICTURE..

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

Reply



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)
 

Opening Breakouts and Reversals w/Al Brooks

Elite only
 

Introducing daytradr by Jigsaw, new stand-alone platform

Oct 19
 

RandBots: AutoTrading Bots to diversify your trading

Oct 24
 

TopstepTrader: Profiting Without Risking Your Own Money

Oct 26

Building Open Source Indicators for NT8 w/Fat Tails @ Lizard Indicators

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:13 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-10-16 in 0.06 seconds with 19 queries on phoenix via your IP 54.196.33.246