Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

Tams

Array (EasyLanguage)

Recommended Posts

This thread is about Arrays.

 

 

 

 

Array

Declares one or more names as arrays, containing multiple variable data elements; specifies the array structure, data elements type and initial value, update basis, and data number, for each of the arrays.

 

Data elements type can be numerical, string, or true/false.

 

The number of elements in an array can be fixed or dynamic (unlimited).

 

In arrays with a fixed number of elements, the elements can be arranged in single or multiple dimensions.

 

A one-dimensional 10-element array contains 10 elements,

a two-dimensional 10-element by 10-element array contains 100 elements,

a three-dimensional 10 by 10 by 10 element array contains 1000 elements,

a four-dimensional 10 by 10 by 10 by 10 element array contains 10000 elements, etc.

 

The maximum number of array dimensions in EasyLanguage is 9.

 

Each element in an array is referenced by one or more index numbers, one for each of the dimensions. Indexing starts at 0 for each of the dimensions.

 

Dynamic arrays (arrays with an unlimited number of elements) are one-dimensional, and are initialized at declaration as having only one element. Declared dynamic arrays can be resized using Array_SetMaxIndex.

 

Elements can be manipulated individually or as a group, in all or part of an array.

 

Usage

Array:<IntraBarPersist>ArrayName1[D1,D2,D3,etc.](InitialValue1<,DataN>),

<IntraBarPersist>ArrayName2[D1,D2,D3,etc.](InitialValue2<,DataN>), etc...

 

Parameters inside the angled brackets are optional

 

Parameters

IntraBarPersist - an optional parameter; specifies that the value of the array elements is to be updated on every tick

If this parameter is not specified, the value will be updated at the close of each bar.

 

ArrayName - an expression specifying the array name

The name can consist of letters, underscore characters, numbers, and periods. The name cannot begin with a number or a period and is not case-sensitive.

 

 

D - a numerical expression specifying the array size in elements, starting at 0, for each of the dimensions;

a single expression specifies a one-dimensional array,

two expressions specify a two-dimensional (D1 by D2) array,

three expressions specify a three-dimensional (D1 by D2 by D3) array, etc.

A dynamic array, with an unlimited number of elements, is specified by the empty square brackets: [] and will be a one-dimensional array.

 

InitialValue - an expression, specifying the initial value and defining the data type for all of the elements in the array

The value can be a numerical, string, or true/false expression; the type of the expression defines the data type.

 

DataN - an optional parameter; specifies the Data Number of the data series the array is to be tied to

If this parameter is not specified, the array will be tied to the default data series.

 

Examples

Declare Length and SFactor as 9-element one-dimensional numerical arrays with data elements' initial values of 0:

 

Array:

Length[8](0),

SFactor[8](0);

 

 

Declare Max_Price as a 24-element by 60-element two-dimensional numerical array, updated on every tick, tied to the series with Data #2, and with data elements' initial values equal to the value of Close function:

 

Array:IntraBarPersist Max_Price[23,59](Close,Data2);

 

 

Declare Highs2 as a dynamic numerical array with data elements' initial values of 0:

 

Array:Highs2[](0);

 

 

 

 

 

source: EasyLanguage manual

Edited by Tams

Share this post


Link to post
Share on other sites

Here you go:

 

 

Paul

 

Courtesy of Tradestation: http://www.tradestation.com

 

The Array concept it is actually very simple.

The attempt of this page is to demystify the concept with simple examples. Please feel free to edit as well as to add alternate methods to clarify the content

 

Think of an array as an Excel spreadsheet, where you have rows and columns.

It is from this approach that the following examples are designed.

 

* One Dimensional Arrays

* Multi Dimensional Arrays

* Populating Arrays

* Shuffling Array Data

* Sort new field into Array - soon

 

 

Incrementing : For Counter = 1 to Array_Size begin... end;

Decrementing : For Counter = Array_Size DownTo 1 begin... end;

One Dimensional ARRAYS

 

With one dimensional arrays you get one column with X number of rows to query.

 

Array: myArray [10] (0);

 

* the [10] defines one column with 10 rows (not to confuse but a 0 row is actually available too to make 11 )

* (0) = Numeric Data

* (Text) = would = String Data could be entered.

 

 

Multi-Dimensional Arrays

 

Multi-Dimensional arrays enable you to store vast amounts of data more similar to a spreadsheet, thus you could add a specific series of data per bar or per condition to back reference for compare.

 

Warning

More standard is the two dimensioned array, but since you can do more a warning must be stated here in using a three dimensional array

For example 3 dimensioned arrray would be myArray[10,10,10]; You should have your reasons well in order in advanced as improper dimensioning could easy take up too much memory as well as calculations time could be increased exponentially . The conceptualization of a three dimensional Array would be a spreadsheet cell hyperlinking to another completely new spreadsheet. A better example may be a pallet of boxs 10 across, 10 high and 10 deep. It starts getting very complicated at that level.

 

Two Dimensional Array

 

Array: myArray [10,10] (0);

 

the [10,10] defines 10 columns with 10 rows (or not counting the 0 row, 100 field to populate with data)

 

* (0) = Numeric Data

* (Text) = would = String Data could be entered.

 

 

So if you ask for

Value1 = myArray*[6,7]*; then you are looking for column 6, row 7's data.

 

 

Populating Arrays

 

Arrays values hold from bar to bar.

An array can be populated by a hard number as in:

myArray[4] = High;

 

or by a Counter method that you predefine variable name is arbitrary as long as the value is not higher than the declared dimensional value.

 

Var: Counter(0);

 

Counter = Counter +1;

myArray[Counter] = High;

 

 

Shuffling Array Data

 

Shuffling simply moves the first row of an array to the second and so forth leaving the Arrays first row open for a new entry.

Normally this is done in one step or procedure.

 

Single Dimension Array Shuffle

 

Array: myArray [10] (0);

Var: myArraySize(10);

Var: Counter1(0);

Var: HoldRow(0), SaveValue(0);

SaveValue = Value1; {your value or caluclation you want arrayed}

For Counter1 = 1 to myArraySize begin

holdRow = myArray[Counter1]; {save the current Value of this row for the next row }

myArray[Counter1] = SaveValue; {pass the newer Value to this row}

SaveValue = holdRow; {pass the old Value of this row for the next loop}

 

 

end;

 

Multi-Dimensioned Array Shuffle

 

The code below will shuffle a multi-dimensional array. A new row will be inserted in position 1 and roll the remaining rows back one row each.

 

Array: myArray [100,10] (0);

Var: myArraySize(100);

Array: Save[10](0); {used as holders for the shuffle}

Array: Hold[10](0); {used as holders for the shuffle}

 

Var: Z(0), X(0); {Using Single Letters as counters}

 

 

{Pass your newest set of Values to a one dimensional Array}

 

If condition1 then begin

{Sample Data}

Hold[1]= Date;

Hold[2]= Time;

Hold[3]= Open;

Hold[4]= High;

Hold[5]= Low;

Hold[6]= Close;

Hold[7]= UpTicks;

Hold[8]= Downticks;

Hold[9]= CurrentBar;

Hold[10]= close -close[1]0;

 

for Z = 1 to myArraySize begin

 

For X = 1 to 10 begin Save[X] = myArray [Z,X]; end; {pass Array Row to Save Array variable LOOP}

 

For X = 1 to 10 begin myArray [Z,X] = Hold[X]; end; {pass Hold Array variables row LOOP}

 

For X = 1 to 10 begin Hold[X] = Save[X]; end; {pass the SaveArray to Hold Array LOOP}

 

if Hold[1]= 0 then BREAK; {Get out of main LOOP if passed row /Hold Array is Empty }

 

end;

end;

Edited by Trader333

Share this post


Link to post
Share on other sites

I'm a good gal, I've made my homeworks.

 

Is it correct ?

 

Var:
count(         0 ),
count.end(   2 );

Arrays: 
Line.ID[2](  0 ),
level[2](	0 ),
Color[2]( 0 );

Level[1] = HighD(1);
Level[2] = LowD(1);

Color[1] = blue;
Color[2] = red;

for count = 1 to count.end
begin
Line.ID[count]  = TL_New( d , t , level[count], d, t , level[count]);
TL_SetColor(Line.ID, Color[count]);
end;

Share this post


Link to post
Share on other sites

a little correction but the result has a lot of lines

 

Var:
count(         0 ),
count.end(   2 );

Arrays: 
Line.ID[2](  0 ),
level[2](	0 ),
Color[2]( 0 );

Level[1] = HighD(1);
Level[2] = LowD(1);

Color[1] = blue;
Color[2] = red;

for count = 1 to count.end
begin
Line.ID[count] = TL_New( d , t , level[count], d, t , level[count]);
TL_SetColor(Line.ID[count], Color[count]);
TL_SetExtRight(Line.ID[count], true );
end;

Share this post


Link to post
Share on other sites
a little correction but the result has a lot of lines

 

wow... good job... you are trying hard.

 

maybe too hard.

I would have suggested you to start out with one array.

and you added trendline to the code as well !!!

you are taking on multiple challenges at the same time.

 

 

 

anyway, here's my notes:

 

You have the trendline starting point same as ending point...

ie. the resultant trendline will be a dot.

that's why you don't see anything unless you use the extend right option.

 

pls see attachment for detail.

array.jpg.df8c7c22c825bac7084327552c2415ee.jpg

Edited by Tams

Share this post


Link to post
Share on other sites

ThanX for your notes Mister TAMS

 

I like it hard ! :cool:

 

Starting point = ending point = OK for a day H/L

 

but

 

Date + time must start the day before

 

// Draw High and Low lines of the day before 
// version 1.0
// Author: aaa
// Date: 20090425

Var:
count(       0 ),
count.end(   2 );

Arrays: 
Line.ID[2](  	0 ),
level[2](	0 ),
Color[2]( 	0 ),
Size[2]( 	0 ),
Style[2]( 	0 );

level[1] = HighD(1);
level[2] = LowD(1);

Color[1] = blue;
Color[2] = red ;

Size[1] = 2 ;
Size[2] = 2 ;

Style[1] = 1 ;
Style[2] = 1 ;

for count = 1 to count.end
begin
Line.ID[count] = TL_New( d[1] , t[1] , level[count], d , t , level[count]);

TL_SetColor( Line.ID[count] , Color[count] );
TL_SetSize(  Line.ID[count] , Size[count]  );
TL_SetStyle( Line.ID[count] , Style[count] );	
end;

Share this post


Link to post
Share on other sites
// Draw High and Low lines of the day before 
// version 1.01
// Author: aaa
// Date: 20090425

Inputs:
Color.High(	blue 	),
Color.low(	red 	),
Size.HL(	2   	),
Style.HL(	1 	);

Var:
count(       0 ),
count.end(   2 );

Arrays: 
Line.ID[2](  	0 ),
level[2](	0 ),
Color[2]( 	0 ),
Size[2]( 	0 ),
Style[2]( 	0 );

level[1] = HighD(1);
level[2] = LowD(1);

Color[1] = Color.High;
Color[2] = Color.low;

Size[1] = Size.HL ;
Size[2] = Size.HL ;

Style[1] = Style.HL ;
Style[2] = Style.HL ;

for count = 1 to count.end
begin
Line.ID[count] = TL_New( d[1] , t[1] , level[count], d , t , level[count]);

TL_SetColor( Line.ID[count] , Color[count] );
TL_SetSize(  Line.ID[count] , Size[count]  );
TL_SetStyle( Line.ID[count] , Style[count] );	
end;

Share this post


Link to post
Share on other sites
It's a Great idea to create topics like this

Sorry, if it's not a really original indicator.... :2c:

It is only an exercice with arrays

 

it is fun just to plot lines here and there...

you'd never know, you might come up with a Nobel Prize winner by accident.

Share this post


Link to post
Share on other sites

Tams,

 

I think that I am in the wrong way

 

I have now the yesterday HL during 2 days

 

The code looks complicate and if I want lines during x days it should be very long

 

The goal is to have the Yesterday HL during x days

 

Are arrays the solution ?

 

Is a counter a solution ?

 

Inputs:
Color.HL(	blue 	),
Size.HL(	2   	),
Style.HL(	1 	);

Var:
count(       0 ),
count.end(   4 );

Arrays: 
Line.ID[4](  	0 ),
level[4](	0 ),
DaysAfter[4](	0 ),
TimeAfter[4](	0 ),
DaysBefore[4](0 ),
TimeBefore[4](0 );

level[1] = HighD(1);
level[2] = LowD(1);
level[3] = HighD(2);
level[4] = LowD(2);

DaysBefore[1] = d[1] ;
DaysBefore[2] = d[1] ;
DaysBefore[3] = d[2] ;
DaysBefore[4] = d[2] ;

TimeBefore[1] = t[1] ;
TimeBefore[2] = t[1] ;
TimeBefore[3] = t[2] ;
TimeBefore[4] = t[2] ;

DaysAfter[1] = d[1] ;
DaysAfter[2] = d[1] ;
DaysAfter[3] = d[2]  ;
DaysAfter[4] = d[2] ;

TimeAfter[1] = t[1]  ;
TimeAfter[2] = t[1] ;
TimeAfter[3] = t[2]  ;
TimeAfter[4] = t[2] ;


for count = 1 to count.end
begin
Line.ID[count] = TL_New( DaysBefore[count] , TimeBefore[count] , level[count], DaysAfter[count]  , TimeAfter[count]  , level[count]);

TL_SetColor( Line.ID[count] , Color.HL);
TL_SetSize(  Line.ID[count] , Size.HL  );
TL_SetStyle( Line.ID[count] , Style.HL );	
end;

Share this post


Link to post
Share on other sites
it is fun just to plot lines here and there...

you'd never know, you might come up with a Nobel Prize winner by accident.

 

Let's try the Tams Prize before ! ;)

Share this post


Link to post
Share on other sites
Tams,

I think that I am in the wrong way

I have now the yesterday HL during 2 days

The code looks complicate and if I want lines during x days it should be very long

The goal is to have the Yesterday HL during x days

Are arrays the solution ?

Is a counter a solution ?

 

 

if you only need 2 lines across... array might be an overkill.

edit: let me give it some thought on the alternative... will post later.

 

 

array is useful when you are dealing with a lot of data,

and that you need to access those data in a non-sequential manner.

 

the Zigzag indicator is a good example where an array is used to keep track of the trendline coordinates.

Edited by Tams

Share this post


Link to post
Share on other sites

Yes I reached my limits with arrays and I don't understand zigzag

 

I tried "my" indicator with 10 days long

 

It looks interesting especially scalping in 1 mn : the price stops always for a short break at highest last 1, 2 3 or more past days (cf picture below)

 

If you have time Could you make a correct code ?

 

Here is my terrible one

 

It works but slows down dramatically the software

 

Also the style is off

 

Inputs:
Days.Nbr(	2 	),
Color.HL(	blue 	),
Size.HL(	2   	),
Style.HL(	1 	);

Var:
count(       0 ),
count.end(   Days.Nbr * 2 );

Arrays: 
Line.ID[20](  0 ),
level[20](	0 ),
DaysAfter[20](0 ),
TimeAfter[20](0 ),
DaysBefore[20](0 ),
TimeBefore[20](0 );

level[1] = HighD(1);
level[2] = LowD(1);
level[3] = HighD(2);
level[4] = LowD(2);
level[5] = HighD(3);
level[6] = LowD(3);
level[7] = HighD(4);
level[8] = LowD(4);
level[9] = HighD(5);
level[10] = LowD(5);
level[11] = HighD(6);
level[12] = LowD(6);
level[13] = HighD(7);
level[14] = LowD(7);
level[15] = HighD(8);
level[16] = LowD(8);
level[17] = HighD(9);
level[18] = LowD(9);
level[19] = HighD(10);
level[20] = LowD(10);

DaysBefore[1] = d[1] ;
DaysBefore[2] = d[1] ;
DaysBefore[3] = d[2] ;
DaysBefore[4] = d[2] ;
DaysBefore[5] = d[3] ;
DaysBefore[6] = d[3] ;
DaysBefore[7] = d[4] ;
DaysBefore[8] = d[4] ;
DaysBefore[9] = d[5] ;
DaysBefore[10] = d[5] ;
DaysBefore[11] = d[6] ;
DaysBefore[12] = d[6] ;
DaysBefore[13] = d[7] ;
DaysBefore[14] = d[7] ;
DaysBefore[15] = d[8] ;
DaysBefore[16] = d[8] ;
DaysBefore[17] = d[9] ;
DaysBefore[18] = d[9] ;
DaysBefore[19] = d[10] ;
DaysBefore[20] = d[10] ;

TimeBefore[1] = t[1] ;
TimeBefore[2] = t[1] ;
TimeBefore[3] = t[2] ;
TimeBefore[4] = t[2] ;
TimeBefore[5] = t[3] ;
TimeBefore[6] = t[3] ;
TimeBefore[7] = t[4] ;
TimeBefore[8] = t[4] ;
TimeBefore[9] = t[5] ;
TimeBefore[10] = t[5] ;
TimeBefore[11] = t[6] ;
TimeBefore[12] = t[6] ;
TimeBefore[13] = t[7] ;
TimeBefore[14] = t[7] ;
TimeBefore[15] = t[8] ;
TimeBefore[16] = t[8] ;
TimeBefore[17] = t[9] ;
TimeBefore[18] = t[9] ;
TimeBefore[19] = t[10] ;
TimeBefore[20] = t[10] ;

DaysAfter[1] = d[1] ;
DaysAfter[2] = d[1] ;
DaysAfter[3] = d[2] ;
DaysAfter[4] = d[2] ;
DaysAfter[5] = d[3] ;
DaysAfter[6] = d[3] ;
DaysAfter[7] = d[4] ;
DaysAfter[8] = d[4] ;
DaysAfter[9] = d[5] ;
DaysAfter[10] = d[5] ;
DaysAfter[11] = d[6] ;
DaysAfter[12] = d[6] ;
DaysAfter[13] = d[7] ;
DaysAfter[14] = d[7] ;
DaysAfter[15] = d[8] ;
DaysAfter[16] = d[8] ;
DaysAfter[17] = d[9] ;
DaysAfter[18] = d[9] ;
DaysAfter[19] = d[10] ;
DaysAfter[20] = d[10] ;

TimeAfter[1] = t[1] ;
TimeAfter[2] = t[1] ;
TimeAfter[3] = t[2] ;
TimeAfter[4] = t[2] ;
TimeAfter[5] = t[3] ;
TimeAfter[6] = t[3] ;
TimeAfter[7] = t[4] ;
TimeAfter[8] = t[4] ;
TimeAfter[9] = t[5] ;
TimeAfter[10] = t[5] ;
TimeAfter[11] = t[6] ;
TimeAfter[12] = t[6] ;
TimeAfter[13] = t[7] ;
TimeAfter[14] = t[7] ;
TimeAfter[15] = t[8] ;
TimeAfter[16] = t[8] ;
TimeAfter[17] = t[9] ;
TimeAfter[18] = t[9] ;
TimeAfter[19] = t[10] ;
TimeAfter[20] = t[10] ;

for count = 1 to count.end
begin
Line.ID[count] = TL_New( DaysBefore[count] , TimeBefore[count] , level[count], DaysAfter[count]  , TimeAfter[count]  , level[count]);

TL_SetColor( Line.ID[count] , Color.HL);
TL_SetSize(  Line.ID[count] , Size.HL  );
//	TL_SetStyle( Line.ID[count] , Style.HL );	
end;

Snap1.thumb.jpg.cd9de38f0206101e6392bd7bfad922fe.jpg

Share this post


Link to post
Share on other sites
Yes I reached my limits with arrays and I don't understand zigzag

I tried "my" indicator with 10 days long

It looks interesting especially scalping in 1 mn : the price stops always for a short break at highest last 1, 2 3 or more past days (cf picture below)

If you have time Could you make a correct code ?

Here is my terrible one

It works but slows down dramatically the software

Also the style is off

 

 

I have posted a sample code at the Trendline thread:

http://www.traderslaboratory.com/forums/showpost.php?p=63601&postcount=3

 

I posted it over there because the code does not use array.

Share this post


Link to post
Share on other sites
Yes I reached my limits with arrays and I don't understand zigzag

I tried "my" indicator with 10 days long

It looks interesting especially scalping in 1 mn : the price stops always for a short break at highest last 1, 2 3 or more past days (cf picture below)

If you have time Could you make a correct code ?

Here is my terrible one

 

It works but slows down dramatically the software

 

Also the style is off

 

 

 

that's because there is an error in coding:

the code is adding a NEW trendline at every bar.

the dotted line you see is not a dotted line...

each dot is actually a trendline; if you click on the dot, you can drag the dot out and see the trendline.

Share this post


Link to post
Share on other sites

Array Keywords

 

Array

Arrays

ArraySize

ArrayStartAddr

 

Array_Compare

Array_Copy

Array_GetMaxIndex

Array_GetType

Array_SetMaxIndex

Array_SetValRange

Array_Sort

Array_Sum

Share this post


Link to post
Share on other sites
i am a little bit out of this thread, but i'd like also make a comparison

about array in easylanguage and ninjatrader.

It would it be possible to explain how array works in c# and how to conver an array from easylanguage to c#?

 

For Ninjatrader/C# you might look here:

 

Arrays (C# Programming Guide)

 

 

Regards,

 

Hal

Share this post


Link to post
Share on other sites
Array Keywords

 

Array

Arrays

ArraySize

ArrayStartAddr

 

Array_Compare

Array_Copy

Array_GetMaxIndex

Array_GetType

Array_SetMaxIndex

Array_SetValRange

Array_Sort

Array_Sum

 

Hi TAMS,

Great Thread for newbie to ARRAY like me.........very useful......many Thanks!!!

 

Now I've some questions about arrays:

1) is it possible to make an array of arrays ?

For example an array made of 2 unlimited dimension array ?

FirstArray[ ] (0);

SecondArray[ ] (0);

MyFinalarray[FirstArray, SecondArray](0);

 

2) I know that an array could be a numeric array [ (0) ] or a string array [ (text) ] or a True/false array, but waht does it mean if I find an array like this:

MyArray [10] (-1);

 

Thanks for you contribution on this study about array.

CrazyNasdaq

Share this post


Link to post
Share on other sites
Hi TAMS,

Great Thread for newbie to ARRAY like me.........very useful......many Thanks!!!

 

Now I've some questions about arrays:

1) is it possible to make an array of arrays ?

 

 

are you talking about a 3 dimensional array?

Yes, you can build it with multiple arrays,

but no, it is not part of the EasyLanguage repertoire.

 

 

 

2) I know that an array could be a numeric array [ (0) ] or a string array [ (text) ] or a True/false array, but waht does it mean if I find an array like this:

MyArray [10] (-1);

 

Thanks for you contribution on this study about array.

CrazyNasdaq

 

 

initialize the array to the value of -1.

read post #1, example included.

 

.

Edited by Tams

Share this post


Link to post
Share on other sites
are you talking about a 3 dimensional array?

Yes, you can build it with multiple arrays,

but no, it is not part of the EasyLanguage repertoire.

No, I don't think that waht I want to build is a 3 dimensional array.

I'm trying to build a Volume profile so it's a 2 dimensional array.

First dimension unlimited and unknown is the range of each day (High of the day - Low of the day) * price scale (or tick scale as you want)

 

Second dimensional array the volume of each level price (unknown )

 

So the final array is an array of the 2 first arrays each one unlimited.

The final array I think is a 2 dimensional array.

Is it possible ???

Or I must use ADE and maps collections ?

 

Thanks again

CrazyNasdaq

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Topics

  • Posts

    • also ... and barely on topic... Winners (always*) overpay. Buying the dips is a subscription to the belief that winners win by underpaying - when in actuality winners (inevitably/always*) win by overpaying... it’s amazing the percentage of traders who think winners win by underpaying ... “Winners (always*) overpay.” ...  One way to implement this ‘belief’ is to only reenter when prices have emphatically resumed the 'trend' .   (Fwiw, While “Winners (always*) overpay.” holds true in most endeavors (relationships, business, sports, etc...) - “Winners (always*) overpay.”  is especially true for auctions... continuous auctions included.)
    • re:  "Does it make sense to always buy the dips?  “Buy the dip.”  You hear this all the time in crypto investing trading speculation gambling. [zdo taking some liberties] It refers, of course, to buying more bitcoin (or digital assets) when they go down in price: when the price “dips.” Some people brag about “buying the dip," showing they know better than the crowd. Others “buy the dip” as an investment strategy: they’re getting a bargain. The problem is, buying the dip is a fallacy. You can’t buy the dip, because you can't see the total dip until much later. First, I’ll explain this in a way that will make it simple and obvious to you; then I’ll show you a better way of investing. You Only Know the Dip in Hindsight When people talk about “buying the dip,” what they’re really saying is, “I bought when the price was going down.” " ... example of a dip ... 
    • Date: 19th April 2024. Weekly Commodity Market Update: Oil Prices Correct and Supply Concerns Persist.   The ongoing developments in the Middle East sparked a wave of risk aversion and fueled supply concerns and investors headed for safety. Hopes for imminent rate cuts from the Federal Reserve diminish while attention is now turning towards the demand outlook. The Gold price hit a high of $2417.89 per ounce overnight. Sentiment has already calmed down again and bullion is trading at $2376.50 per ounce as haven flows ease. Oil prices initially moved higher as concern over escalating tensions with the WTI contract hit a session high of $85.508 per barrel overnight, before correcting to currently $81.45 per barrel. Oil Prices Under Pressure Amid Middle East Tensions Last week, commodity indexes showed little movement, with Oil prices undergoing a slight correction. Meanwhile, Gold reached yet another record high, mirroring the upward trend in cocoa prices. Once again today, USOil prices experienced a correction and has remained under pressure, retesting the 50-day EMA at $81.00 as we moving into the weekend. Hence, despite the Israel’s retaliatory strike on Iran, sentiments stabilized following reports suggesting a measured response aimed at avoiding further escalation. Brent crude futures witnessed a more than 4% leap, driven by concerns over potential disruptions to oil supplies in the Middle East, only to subsequently erase all gains. Similarly with USOIL, UKOIL hovers just below $87 per barrel, marginally below Thursday’s closing figures. Nevertheless, volatility is expected to continue in the market as several potential risks loom:   Disruption to the Strait of Hormuz: The possibility of Iran disrupting navigation through the vital shipping lane, is still in play. The Strait of Hormuz serves as the Persian Gulf’s primary route to international waters, with approximately 21 million barrels of oil passing through daily. Recent events, including Iran’s seizure of an Israel-linked container ship, underscore the geopolitical sensitivity of the region. Tougher Sanctions on Iran: Analysts speculate that the US may impose stricter sanctions on Iranian oil exports or intensify enforcement of existing restrictions. With global oil consumption reaching 102 million barrels per day, Iran’s production of 3.3 million barrels remains significant. Recent actions targeting Venezuelan oil highlight the potential for increased pressure on Iranian exports. OPEC Output Increases: Despite the desire for higher prices, OPEC members such as Saudi Arabia and Russia have constrained output in recent years. However, sustained crude prices above $100 per barrel could prompt concerns about demand and incentivize increased production. The OPEC may opt to boost oil output should tensions escalate further and prices surge. Ukraine Conflict: Amidst the focus on the Middle East, markets overlooking Russia’s actions in Ukraine. Potential retaliatory strikes by Kyiv on Russian oil infrastructure could impact exports, adding further complexity to global oil markets.   Technical Analysis USOIL is marking one of the steepest weekly declines witnessed this year after a brief period of consolidation. The breach below the pivotal support level of 84.00, coupled with the descent below the mid of the 4-month upchannel, signals a possible shift in market sentiment towards a bearish trend reversal. Adding to the bearish outlook are indications such as the downward slope in the RSI. However, the asset still hold above the 50-day EMA which coincides also with the mid of last year’s downleg, with key support zone at $80.00-$81.00. If it breaks this support zone, the focus may shift towards the 200-day EMA and 38.2% Fib. level at $77.60-$79.00. Conversely, a rejection of the $81 level and an upside potential could see the price returning back to $84.00. A break of the latter could trigger the attention back to the December’s resistance, situated around $86.60. A breakthrough above this level could ignite a stronger rally towards the $89.20-$90.00 zone. Always trade with strict risk management. Your capital is the single most important aspect of your trading business. Please note that times displayed based on local time zone and are from time of writing this report. Click HERE to access the full HFM Economic calendar. Want to learn to trade and analyse the markets? Join our webinars and get analysis and trading ideas combined with better understanding on how markets work. Click HERE to register for FREE! Click HERE to READ more Market news. Michalis Efthymiou Market Analyst HMarkets Disclaimer: This material is provided as a general marketing communication for information purposes only and does not constitute an independent investment research. Nothing in this communication contains, or should be considered as containing, an investment advice or an investment recommendation or a solicitation for the purpose of buying or selling of any financial instrument. All information provided is gathered from reputable sources and any information containing an indication of past perfrmance is not a guarantee or reliable indicator of future performance. Users acknowledge that any investment in FX and CFDs products is characterized by a certain degree of uncertainty and that any investment of this nature involves a high level of risk for which the users are solely responsible and liable. We assume no liability for any loss arising from any investment made based on the information provided in this communication. This communication must not be reproduced or further distributed without our prior written permission.
    • Date: 18th April 2024. Market News – Stock markets benefit from Dollar correction. Economic Indicators & Central Banks:   Technical buying, bargain hunting, and risk aversion helped Treasuries rally and unwind recent losses. Yields dropped from the recent 2024 highs. Asian stock markets strengthened, as the US Dollar corrected in the wake of comments from Japan’s currency chief Masato Kanda, who said G7 countries continue to stress that excessive swings and disorderly moves in the foreign exchange market were harmful for economies. US Stockpiles expanded to 10-month high. The data overshadowed the impact of geopolitical tensions in the Middle East as traders await Israel’s response to Iran’s unprecedented recent attack. President Joe Biden called for higher tariffs on imports of Chinese steel and aluminum.   Financial Markets Performance:   The USDIndex stumbled, falling to 105.66 at the end of the day from the intraday high of 106.48. It lost ground against most of its G10 peers. There wasn’t much on the calendar to provide new direction. USDJPY lows retesting the 154 bottom! NOT an intervention yet. BoJ/MoF USDJPY intervention happens when there is more than 100+ pip move in seconds, not 50 pips. USOIL slumped by 3% near $82, as US crude inventories rose by 2.7 million barrels last week, hitting the highest level since last June, while gauges of fuel demand declined. Gold strengthened as the dollar weakened and bullion is trading at $2378.44 per ounce. Market Trends:   Wall Street closed in the red after opening with small corrective gains. The NASDAQ underperformed, slumping -1.15%, with the S&P500 -0.58% lower, while the Dow lost -0.12. The Nikkei closed 0.2% higher, the Hang Seng gained more than 1. European and US futures are finding buyers. A gauge of global chip stocks and AI bellwether Nvidia Corp. have both fallen into a technical correction. The TMSC reported its first profit rise in a year, after strong AI demand revived growth at the world’s biggest contract chipmaker. The main chipmaker to Apple Inc. and Nvidia Corp. recorded a 9% rise in net income, beating estimates. Always trade with strict risk management. Your capital is the single most important aspect of your trading business. Please note that times displayed based on local time zone and are from time of writing this report. Click HERE to access the full HFM Economic calendar. Want to learn to trade and analyse the markets? Join our webinars and get analysis and trading ideas combined with better understanding on how markets work. Click HERE to register for FREE! Click HERE to READ more Market news. Andria Pichidi Market Analyst HFMarkets Disclaimer: This material is provided as a general marketing communication for information purposes only and does not constitute an independent investment research. Nothing in this communication contains, or should be considered as containing, an investment advice or an investment recommendation or a solicitation for the purpose of buying or selling of any financial instrument. All information provided is gathered from reputable sources and any information containing an indication of past performance is not a guarantee or reliable indicator of future performance. Users acknowledge that any investment in FX and CFDs products is characterized by a certain degree of uncertainty and that any investment of this nature involves a high level of risk for which the users are solely responsible and liable. We assume no liability for any loss arising from any investment made based on the information provided in this communication. This communication must not be reproduced or further distributed without our prior written permission.
    • Date: 17th April 2024. Market News – Appetite for risk-taking remains weak. Economic Indicators & Central Banks:   Stocks, Treasury yields and US Dollar stay firmed. Fed Chair Powell added to the recent sell off. His slightly more hawkish tone further priced out chances for any imminent action and the timing of a cut was pushed out further. He suggested if higher inflation does persist, the Fed will hold rates steady “for as long as needed.” Implied Fed Fund: There remains no real chance for a move on May 1 and at their intraday highs the June implied funds rate future showed only 5 bps, while July reflected only 10 bps. And a full 25 bps was not priced in until November, with 38 bps in cuts seen for 2024. US & EU Economies Diverging: Lagarde says ECB is moving toward rate cuts – if there are no major shocks. UK March CPI inflation falls less than expected. Output price inflation has started to nudge higher, despite another decline in input prices. Together with yesterday’s higher than expected wage numbers, the data will add to the arguments of the hawks at the BoE, which remain very reluctant to contemplate rate cuts. Canada CPI rose 0.6% in March, double the 0.3% February increase BUT core eased. The doors are still open for a possible cut at the next BoC meeting on June 5. IMF revised up its global growth forecast for 2024 with inflation easing, in its new World Economic Outlook. This is consistent with a global soft landing, according to the report. Financial Markets Performance:   USDJPY also inched up to 154.67 on expectations the BoJ will remain accommodative and as the market challenges a perceived 155 red line for MoF intervention. USOIL prices slipped -0.15% to $84.20 per barrel. Gold rose 0.24% to $2389.11 per ounce, a new record closing high as geopolitical risks overshadowed the impacts of rising rates and the stronger dollar. Market Trends:   Wall Street waffled either side of unchanged on the day amid dimming rate cut potential, rising yields, and earnings. The major indexes closed mixed with the Dow up 0.17%, while the S&P500 and NASDAQ lost -0.21% and -0.12%, respectively. Asian stock markets mostly corrected again, with Japanese bourses underperforming and the Nikkei down -1.3%. Mainland China bourses were a notable exception and the CSI 300 rallied 1.4%, but the MSCI Asia Pacific index came close to erasing the gains for this year. Always trade with strict risk management. Your capital is the single most important aspect of your trading business. Please note that times displayed based on local time zone and are from time of writing this report. Click HERE to access the full HFM Economic calendar. Want to learn to trade and analyse the markets? Join our webinars and get analysis and trading ideas combined with better understanding on how markets work. Click HERE to register for FREE! Click HERE to READ more Market news. Andria Pichidi Market Analyst HFMarkets Disclaimer: This material is provided as a general marketing communication for information purposes only and does not constitute an independent investment research. Nothing in this communication contains, or should be considered as containing, an investment advice or an investment recommendation or a solicitation for the purpose of buying or selling of any financial instrument. All information provided is gathered from reputable sources and any information containing an indication of past performance is not a guarantee or reliable indicator of future performance. Users acknowledge that any investment in FX and CFDs products is characterized by a certain degree of uncertainty and that any investment of this nature involves a high level of risk for which the users are solely responsible and liable. We assume no liability for any loss arising from any investment made based on the information provided in this communication. This communication must not be reproduced or further distributed without our prior written permission.vvvvvvv
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.