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.

Tradewinds

Object-Oriented Programming OOP

Recommended Posts

Great idea ... I'm a programmer by trade so I will be more than happy to help and answer questions ... bring them on!

 

MMS

 

When you first learned OOP basics, can you recall anything that didn't make sense to you? Did you learn it quickly? Are there things that quickly made sense to you? Was there anything about OOP that took a while for you to understand? Did you need to develop a different way of thinking? Is there anything about OOP that you confuse with procedural programing? Is there anything about OOP that you still make a mistake on? These are the kinds of things that I'd be interested in hearing about; from you or anyone else.

Share this post


Link to post
Share on other sites
When you first learned OOP basics, can you recall anything that didn't make sense to you?

 

This applies to programming in general but understanding and being able to program something using recursion. Once you understand this, OO becomes much easier as you are now able to think about objects\reuse\etc in an abstract way.

 

Did you learn it quickly? Are there things that quickly made sense to you?

 

Too me, basic OO is just a way to organize data\code into useful, self-contained things - called objects. So instead of having 10 variables and 50 procedures\functions in a file, instead you have 5 objects each with 2 variables with 10 functions\properties each. So coding and understanding this is easier as you are breaking the problem down into something smaller and more manageable.

 

Was there anything about OOP that took a while for you to understand? Did you need to develop a different way of thinking?

 

Now there are advanced features of OO that took some more practice, like Inheritance and Polymorphism. These features are there to help reuse code. Summary:

1. Objects - used to organize code\functionality

2. Inheritence\Polymorphism - ways to reuse code and reduce copy\paste

 

Is there anything about OOP that you confuse with procedural programing? Is there anything about OOP that you still make a mistake on? These are the kinds of things that I'd be interested in hearing about; from you or anyone else.

 

I would say a common mistake is for people to 'over-engineer' their object hierarchies and incorrectly implement Inheritance and Polymorphism. I've seen OO programs much more damn confusing than a procedural programs. It all depends on using the tools correctly. OO gives plenty of rope for people to hang themselves with.

 

But given the complexity of software today, some applications would be nearly impossible without OO.

 

thx

MMS

Share this post


Link to post
Share on other sites

When OO came on the popular computing scene ~25 yr ago (largely due to the availability of personal computer to the general public), it was all hype and hoopla, it was the best thing invented since sliced bread. It was the "future" of programming.

 

25 years later, I am surprised to see TS taking it on as a trading language.

 

My personal take (only personal 2 cents' worth) -- it is a waste of otherwise useful and productive time for the non-programmers (especially traders) trying to learn and implement any serious and extensive OO programming project.

 

OO programming is a craft, not a skill.

It requires dedication and discipline to learn.

It requires total immersion to learn it well. (object thinking is a paradigm shift)

It requires practice practice and practice

(ie. getting paid to do it professionally on the boss' dime).

 

If you have not touched a piece of EasyLanguage code for 3 months,

you can pick it up and understand the operation immediately.

 

If you have not touched a piece of OO code for 3 months,

it might take you a day(s) to understand the heads and tails of things

(unless it is a very short code).

 

OO is great for big and complicated projects. (eg. a comprehensive autotrade)

EasyLanguage is good for small to medium sized indicators and simple autotrades.

 

For the full time trader and amateur programmer,

my advice is to stick to EasyLanguage and spend your precious time trading and making money, and if you have extra time, go and have fun doing things with the money you earned.

 

Again, don't mean to discourage anybody taking it on... this is only my 2 cents' worth of gut feelings. YMMV.

Edited by Tams

Share this post


Link to post
Share on other sites

Too me, basic OO is just a way to organize data\code into useful, self-contained things - called objects. So instead of having 10 variables and 50 procedures\functions in a file, instead you have 5 objects each with 2 variables with 10 functions\properties each. So coding and understanding this is easier as you are breaking the problem down into something smaller and more manageable.

thx

MMS

 

This sound interesting, and thank you for the feedback. What I'd be interested in seeing is two sets of very simple code, one procedural, one OO. For example, the price breaks the last high. Don't show all the code for how to determine the last high, just assume that we already have that. What would be the object? How would you program the condition of the current close going over the last high? I don't know if you could do it in pseudo code?

 

var: LastHigh(0), NewHigh(False);

NewHigh = Close > LastHigh;  // NewHigh is assigned a value of 'True' when condition met

 

How would OO code be different?

Share this post


Link to post
Share on other sites
What would be the object? How would you program the condition of the current close going over the last high? I don't know if you could do it in pseudo code?

 

var: LastHigh(0), NewHigh(False);

NewHigh = Close > LastHigh;  // NewHigh is assigned a value of 'True' when condition met

 

How would OO code be different?

 

I could see a vendor building the code this way - where the instrument (stock, etc) is the object and things like volume, price, etc. are its properties. e.g.

 

class Stock()
{
 // variables to hold data
 int LastHigh;
 int Close;
 int Price;
 int Volume:

 // properties to return calculated data values
 bool NewHigh {
   return Close > LastHigh;
 }
}

 

Then someone would use this object like so:

 

Stock s = new Stock("AAPL");
if (s.NewHigh == true) BUY!!

 

So it all depends on the framework provided by the vendor. I know NinjaTrader is built with C# so if you program against it, essentially you are using OO. But like Tams said earlier, if the main goal is Trading, it doesn't matter whether it is OO or not, the tool doesn't matter. You just want it to work.

 

thx

MMS

Share this post


Link to post
Share on other sites

25 years later, I am surprised to see TS taking it on as a trading language.

 

My personal take (only personal 2 cents' worth) -- it is a waste of otherwise useful and productive time for the non-programmers (especially traders) trying to learn and implement any serious and extensive OO programming project.

 

I wouldn't care about OO, but I have this code that was created as an example by TradeStation, and it's the only code that I know of that will do what I want. I don't know of any other options. It has to do with running the code, and therefore a clock, independent from having the code calculate dependent upon data ticks.

 

Plus I'm not sure if there is functionality, options available in OO in EasyLanguage not available otherwise. So, in a sense, I feel that I'm being forced to learn two programing languages, and I may need to use both of them in the same indicator.

Share this post


Link to post
Share on other sites
So, in a sense, I feel that I'm being forced to learn two programing languages, and I may need to use both of them in the same indicator.

 

OO is not a new programming language - it more like a new technique of how to use a programming language. C# is a OO language but you can write a program that is 100% procedural in nature. So if it was written in EasyLanguage, you just have to get your head around how they organized the code, and if they used any OO features of the language. You don't have to learn another language. I hope that makes sense ...

 

MMS

Share this post


Link to post
Share on other sites
OO is not a new programming language -

 

Well, yes, you are right OO is not a new programming language. But the reality is, I need to go through a whole new learning process that is just as much work as learning a new language. Actually it's more work, because I already know procedural programing logic, so I could go to another language, and just need to learn the syntax and nomenclature.

Share this post


Link to post
Share on other sites
I wouldn't care about OO, but I have this code that was created as an example by TradeStation, and it's the only code that I know of that will do what I want. I don't know of any other options. It has to do with running the code, and therefore a clock, independent from having the code calculate dependent upon data ticks.

 

Plus I'm not sure if there is functionality, options available in OO in EasyLanguage not available otherwise. So, in a sense, I feel that I'm being forced to learn two programing languages, and I may need to use both of them in the same indicator.

 

can't help you if you have to use a piece of code written by TS in OO.

 

for tasks beyond what EL offers, I would rather go to PowerBasic, or FreeBasic, etc., not OO.

Share this post


Link to post
Share on other sites

Okay, I'd like to go through an entire indicator in OOP, and figure out everything step by step. Let's use the indicator to send an order to the market.

 

Input: string iAccount1( "Enter Your Equities Account Number" ), int iQuantity1(100), PlaceOrderNow(FALSE);

vars: tsdata.trading.Order MyOrder(NULL);

{Called whenever the order status is updated}
Method void OrderStatusUpdate(elsystem.Object sender, tsdata.trading.OrderUpdatedEventArgs args)
begin
UpdatePlots();
end;

{Plots the order status}
method void UpdatePlots()
begin
Plot1(MyOrder.State.ToString()); 
end;

{Send the order when TRUE and sets the method used to handle Order Status Updated events} 
If PlaceOrderNow then begin
{Order sent only once per load in this example}
once MyOrder = OrderTicket1.Send();
MyOrder.Updated += OrderStatusUpdate;
UpdatePlots();
end;

 

First are user INPUTS:

 

Input: string iAccount1( "Enter Your Equities Account Number" ), int iQuantity1(100), PlaceOrderNow(FALSE);

 

This doesn't look any different than with procedural programing.

 

Next are VARIABLES:

 

vars: tsdata.trading.Order MyOrder(NULL);

 

'vars:' is the same, but the variable 'MyOrder' is preceded with some stuff. What is this stuff?

 

tsdata.trading is a Namespace, whatever that means. I guess that 'Order' is the Class, whatever that means. "tsdata.trading.Order" has Properties, Methods and Events, but I don't see anything about creating a variable. Okay, I found something else.

 

tsdata.trading

 

Contains classes that are used to manage trades, positions, and account information.

 

Okay, I can understand about managing trades, managing positions and managing account information. So if I want to manage a trade, I need to somehow use this 'tsdata.trading' Namespace. That makes some sense to me, but I still don't know why they have to call it a 'Namespace' or what a Namespace is. It seems kind of stupid. It's like a generic term that has it's place in some kind of structure, but it doesn't intuitively mean anything to me. So I just need to know that there are these things called 'Namespaces', and they are at the foundation of the hierarchy. I need to deal with them first, or I can't get to the the other stuff. If I don't use the Namespace tsdata.trading, then I can't get to the point where the code actually issues a buy command. Would you say that is correct?

 

So, to declare a variable, it seems like I need to list the Namespace first and attach the 'Order' class to it. But I still have absolutely no idea why I need to list the Namespace and Class before the variable name. And I don't see anything in the help to tell me what the syntax is for declaring a variable. I guess it's just something you need to magically know.

 

Okay, maybe what it does, is set up a relationship with the variable MyOrder to the 'tsdata.trading.Order' thingy so I don't need to type that every time. So I can just type 'MyOrder' instead of 'tsdata.trading.Order'?

 

Anyway, That's enough for now. If anyone can magically make this more understandable, please feel free to comment.

Share this post


Link to post
Share on other sites

Let's move on to the next section:

 

{Called whenever the order status is updated}
Method void OrderStatusUpdate(elsystem.Object sender, tsdata.trading.OrderUpdatedEventArgs args)
begin
UpdatePlots();
end;

 

The above section of code is a subroutine. Don't confuse the Method reserved word with Object Oriented Methods. These are two different things. The above subroutine is named 'OrderStatusUpdate'. The 'OrderStatusUpdate' subroutine runs whenever it is called with the 'OrderStatusUpdate' name. Subroutines created with the Method reserved word can receive arguments passed to it. In this indicator, the call to the subroutine comes later down in the code than the subroutine. Method Subroutines can be called from a line either below or above the subroutine. A sequential programing flow is not required. It looks like the 'OrderStatusUpdate' subroutine is set up to receive a couple input arguments.

 

The first argument is: elsystem.Object sender

 

elsystem.Object is as follows:

 

A base class from which all other classes are derived. Every method in the Object class is available in all objects in the system, although derived classes can and do override some of the base methods. TradeStation HELP

 

'sender' and 'args' are the names given to the input parameters. elsystem.Object is the data type of the input 'sender'. The data type must be put in front of each input parameter name. Okay, 'sender' and 'args' are just named parameters. Sort of like naming variables, but here, the inputs are named.

 

So the Method subroutine will receive data of data types, elsystem.Object and tsdata.trading.OrderUpdatedEventArgs, and those data type names are 'sender' and 'args'.

So this subroutine named 'OrderStatusUpdate' will receive inputs, and then this subroutine calls another subroutine named 'UpdatePlots'.

 

I don't know what the point is of the subroutine 'OrderStatusUpdate' receiving inputs. I don't see that those inputs are used in any way, unless they are then passed on again to the 'UpdatePlots' subroutine. But I don't know if that's what happens or not.

Share this post


Link to post
Share on other sites

Next are VARIABLES:

 

vars: tsdata.trading.Order MyOrder(NULL);

 

'vars:' is the same, but the variable 'MyOrder' is preceded with some stuff. What is this stuff?

 

tsdata.trading is a Namespace, whatever that means.

 

A namespace is used to organize Classes. In large systems, there may be many classes what would have the 'name' Order, so to differentiate between them, you put them into its own 'namespace', which is 'tsdata.trading'

 

Remember my first post about OO being a way to organize code. This is a real-life example of that.

 

I need to deal with them first, or I can't get to the the other stuff. If I don't use the Namespace tsdata.trading, then I can't get to the point where the code actually issues a buy command. Would you say that is correct?

 

To use the correct Order class, you have to declare the correct one by using its 'fullname' - which would be tsdata.trading.Order. So yes to your question.

 

Okay, maybe what it does, is set up a relationship with the variable MyOrder to the 'tsdata.trading.Order' thingy so I don't need to type that every time. So I can just type 'MyOrder' instead of 'tsdata.trading.Order'?

 

No, 'MyOrder' is simply the variable name. A variable must be declared to be of a type, most commonly an integer or a string. But here, it is of type 'tsdata.trading.Order'. So 'MyOrder' is a 'tsdata.trading.Order'

 

I hope my explanations are clear ... some references:

Introduction to Object Oriented Programming Concepts (OOP) and More - CodeProject

 

thx

MMS

Share this post


Link to post
Share on other sites

I don't know what the point is of the subroutine 'OrderStatusUpdate' receiving inputs. I don't see that those inputs are used in any way, unless they are then passed on again to the 'UpdatePlots' subroutine. But I don't know if that's what happens or not.

 

This method is called an 'event handler' (I can tell by the type of the parameters - tsdata.trading.OrderUpdatedEventArgs).

 

An 'event handler' is the method that runs code when the 'OrderStatusUpdate' event happens in your program. These parameters are common to event handlers, as it tells the receiver who triggered the event (elsystem.Object sender) and if there are any arguments for the event (tsdata.trading.OrderUpdatedEventArgs args - this would be data, etc).

 

In this particular example, the parameters are not used but more often than not, these parameters would be used.

 

MMS

Share this post


Link to post
Share on other sites
This method is called an 'event handler' (I can tell by the type of the parameters - tsdata.trading.OrderUpdatedEventArgs).

 

An 'event handler' is the method that runs code when the 'OrderStatusUpdate' event happens in your program. These parameters are common to event handlers, as it tells the receiver who triggered the event (elsystem.Object sender) and if there are any arguments for the event (tsdata.trading.OrderUpdatedEventArgs args - this would be data, etc).

 

In this particular example, the parameters are not used but more often than not, these parameters would be used.

 

MMS

 

Okay, so when the status of an order changes, the platform updates and maintains the info about the order change in a database. Information on the order status can be retrieved and sent to the 'Event Handler' when something detects the 'OrderStatusUpdate' event?

 

Are there some basic rules about the 'sender' and 'receiver'? I'm assuming that the 'sender' was whatever called the event handler? And the receiver is the event handler?

Share this post


Link to post
Share on other sites

Let's look that the last part of the code:

 

{Send the order when TRUE and sets the method used to handle Order Status Updated events} 
If PlaceOrderNow then begin
{Order sent only once per load in this example}
once MyOrder = OrderTicket1.Send();
MyOrder.Updated += OrderStatusUpdate;
UpdatePlots();
end;

 

'MyOrder' is a variable. I'm familiar enough with EasyLanguage to know that certain commands return an output value, and it's required to set a variable equal to the command in order to receive the output value. So the variable, 'MyOrder' is set equal to the OrderTicket1.Send() Method. This places the order.

 

Then on the next line, the variable 'MyOrder' has something appended to it.

 

MyOrder.Updated

 

I use the autocomplete, and went through the list of things available to 'MyOrder', and 'Updated' has a lightening bolt icon in front of it. I don't know what that icon stands for. There are different icons that mean different things. Okay, I just found it, the lightening bolt means that it's an Event. The Help states that 'Updated' is an Event Handler that is called whenever the object is updated. The Event Handler is called, but what does that do? I really don't know what the end result of 'MyOrder.Updated' is?

 

Now, I don't know what the plus and equal signs do in the line:

 

MyOrder.Updated += OrderStatusUpdate;

 

The OrderStatusUpdate is the subroutine name. So that makes the subroutine run. I don't know why the plus and equals signs are there?

Share this post


Link to post
Share on other sites

I guess that Events allow objects to send and receive information. A property is easy to understand. The button is blue. The Order Qty is 1. Methods cause some action. Send the Order.

 

Properties

Methods

Events

 

Events don't cause an action, but you use an Event if you want to get information, or send information about an object?

Share this post


Link to post
Share on other sites

 

Next are VARIABLES:

 

vars: tsdata.trading.Order MyOrder(NULL);

 

'vars:' is the same, but the variable 'MyOrder' is preceded with some stuff. What is this stuff?

 

Okay, maybe what it does, is set up a relationship with the variable MyOrder to the 'tsdata.trading.Order' thingy so I don't need to type that every time. So I can just type 'MyOrder' instead of 'tsdata.trading.Order'?

 

No, 'MyOrder' is simply the variable name. A variable must be declared to be of a type, most commonly an integer or a string. But here, it is of type 'tsdata.trading.Order'. So 'MyOrder' is a 'tsdata.trading.Order'

 

I do know that once the variable has been defined in that way, with 'tsdata.trading.Order' as the type of data, that the variable 'MyOrder' has options available to it.

 

I can not use:

 

tsdata.trading.Order.Cancel

 

But I CAN do this:

 

MyOrder.Cancel

 

I don't know why those two are not interchangeable.

Share this post


Link to post
Share on other sites
Okay, so when the status of an order changes, the platform updates and maintains the info about the order change in a database. Information on the order status can be retrieved and sent to the 'Event Handler' when something detects the 'OrderStatusUpdate' event?

 

Yes it usually works like that

 

Are there some basic rules about the 'sender' and 'receiver'? I'm assuming that the 'sender' was whatever called the event handler? And the receiver is the event handler?

 

The sender can be any object that initiates the event. And a receiver can be any object that chooses to listen for the event. Remember, in OO, all functions\methods are attached to an object. So 'event handler' is just a specific function on an object that contains the code that responds to the event.

 

MMS

Share this post


Link to post
Share on other sites
So the variable, 'MyOrder' is set equal to the OrderTicket1.Send() Method. This places the order.

 

More accurately, the MyOrder variable is set to the output of the OrderTicket1.Send() method. What is happening here is the OrderTicket1.Send() method returns a Order object and you are setting MyOrder to point to that object.

 

'Updated' has a lightening bolt icon in front of it.

 

These are 'events' that are initiated by the object

 

MyOrder.Updated += OrderStatusUpdate;

 

What this is doing is registering the OrderStatusUpdate 'event handler' (that we talked about in the previous post) to the event MyOrder.Updated.

 

So whenever the Updated event (on the MyOrder object) happens, it will call the event handler OrderStatusUpdate.

 

thx,

MMS

Share this post


Link to post
Share on other sites
I guess that Events allow objects to send and receive information. Events don't cause an action, but you use an Event if you want to get information, or send information about an object?

 

Events allow objects to notify other objects about its state. You use events when you want to be notified when another objects' state changed (e.g. OrderStatusUpdated). At that point, the receiving object can get all information it needs from the event arguments or from the sender of the event.

 

MMS

Share this post


Link to post
Share on other sites

I can not use:

 

tsdata.trading.Order.Cancel

 

But I CAN do this:

 

MyOrder.Cancel

 

I don't know why those two are not interchangeable.

 

Type defines the properties\functions\events\etc of an object - like a blueprint.

But an object is an instance of the Type - like a house.

 

Maybe another analogy will help here ...

 

tsdata.trading.Order == 'Human'

MyOrder == 'Mark'

 

So MyOrder is an instance of Type tsdata.trading.Order

just as 'Mark' is an instance of Type 'Human'

 

So therefore you can call 'MyOrder.Cancel'

just like you can call 'Mark.Walk'

 

But 'Human.Walk' doesn't make sense because 'Human' is just a definition. 'Mark' is the instance of that definition. Thats why you can't call 'tsdata.trading.Order.Cancel'

 

MMS

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

    • 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
    • Date: 16th April 2024. Market News – Stocks and currencies sell off; USD up. Economic Indicators & Central Banks:   Stocks and currencies sell off, while the US Dollar picks up haven flows. Treasuries yields spiked again to fresh 2024 peaks before paring losses into the close, post, the stronger than expected retail sales eliciting a broad sell off in the markets. Rates surged as the data pushed rate cut bets further into the future with July now less than a 50-50 chance. Wall Street finished with steep declines led by tech. Stocks opened in the green on a relief trade after Israel repulsed the well advertised attack from Iran on Sunday. But equities turned sharply lower and extended last week’s declines amid the rise in yields. Investor concerns were intensified as Israel threatened retaliation. There’s growing anxiety over earnings even after a big beat from Goldman Sachs. UK labor market data was mixed, as the ILO unemployment rate unexpectedly lifted, while wage growth came in higher than anticipated – The data suggests that the labor market is catching up with the recession. Mixed messages then for the BoE. China grew by 5.3% in Q1 however the numbers are causing a lot of doubts over sustainability of this growth. The bounce came in the first 2 months of the year. In March, growth in retail sales slumped and industrial output decelerated below forecasts, suggesting challenges on the horizon. Today: Germany ZEW, US housing starts & industrial production, Fed Vice Chair Philip Jefferson speech, BOE Bailey speech & IMF outlook. Earnings releases: Morgan Stanley and Bank of America. Financial Markets Performance:   The US Dollar rallied to 106.19 after testing 106.25, gaining against JPY and rising to 154.23, despite intervention risk. Yen traders started to see the 160 mark as the next Resistance level. Gold surged 1.76% to $2386 per ounce amid geopolitical risks and Chinese buying, even as the USD firmed and yields climbed. USOIL is flat at $85 per barrel. Market Trends:   Breaks of key technical levels exacerbated the sell off. Tech was the big loser with the NASDAQ plunging -1.79% to 15,885 while the S&P500 dropped -1.20% to 5061, with the Dow sliding -0.65% to 37,735. The S&P had the biggest 2-day sell off since March 2023. Nikkei and ASX lost -1.9% and -1.8% respectively, and the Hang Seng is down -2.1%. European bourses are down more than -1% and US futures are also in the red. CTA selling tsunami: “Just a few points lower CTAs will for the first time this year start selling in size, to add insult to injury, we are breaking major trend-lines in equities and the gamma stabilizer is totally gone.” Short term CTA threshold levels are kicking in big time according to GS. Medium term is 4873 (most important) while the long term level is at 4605. 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: 15th April 2024. Market News – Negative Reversion; Safe Havens Rally. Trading Leveraged Products is risky Economic Indicators & Central Banks:   Markets weigh risk of retaliation cycle in Middle East. Initially the retaliatory strike from Iran on Israel fostered a haven bid, into bonds, gold and other haven assets, as it threatens a wider regional conflict. However, this morning, Oil and Asian equity markets were muted as traders shrugged off fears of a war escalation in the Middle East. Iran said “the matter can be deemed concluded”, and President Joe Biden has called on Israel to exercise restraint following Iran’s drone and missile strike, as part of Washington’s efforts to ease tensions in the Middle East and minimize the likelihood of a widespread regional conflict. New US and UK sanctions banned deliveries of Russian supplies, i.e. key industrial metals, produced after midnight on Friday. Aluminum jumped 9.4%, nickel rose 8.8%, suggesting brokers are bracing for major supply chain disruption. Financial Markets Performance:   The USDIndex fell back from highs over 106 to currently 105.70. The Yen dip against USD to 153.85. USOIL settled lower at 84.50 per barrel and Gold is trading below session highs at currently $2357.92 per ounce. Copper, more liquid and driven by the global economy over recent weeks, was more subdued this morning. Currently at $4.3180. Market Trends:   Asian stock markets traded mixed, but European and US futures are slightly higher after a tough session on Friday and yields have picked up. Mainland China bourses outperformed overnight, after Beijing offered renewed regulatory support. The PBOC meanwhile left the 1-year MLF rate unchanged, while once again draining funds from the system. Nikkei slipped 1% to 39,114.19. On Friday, NASDAQ slumped -1.62% to 16,175, unwinding most of Thursday’s 1.68% jump to a new all-time high at 16,442. The S&P500 fell -1.46% and the Dow dropped 1.24%. Declines were broadbased with all 11 sectors of the S&P finishing in the red. JPMorgan Chase sank 6.5% despite reporting stronger profit in Q1. The nation’s largest bank gave a forecast for a key source of income this year that fell below Wall Street’s estimate, calling for only modest growth. Apple shipments drop by 10% in Q1. 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.
    • The morning of my last post I happened to glance over to the side and saw “...angst over the FOMC’s rate trajectory triggered a flight to safety, hence boosting the haven demand. “   http://www.traderslaboratory.com/forums/topic/21621-hfmarkets-hfmcom-market-analysis-services/page/17/?tab=comments#comment-228522   I reacted, but didn’t take time to  respond then... will now --- HFBlogNews, I don’t know if you are simply aggregating the chosen narratives for the day or if it’s your own reporting... either way - “flight to safety”????  haven ?????  Re: “safety  - ”Those ‘solid rocks’ are getting so fragile a hit from a dandelion blowball might shatter them... like now nobody wants to buy longer term new issues at these rates...yet the financial media still follows the scripts... The imagery they pound day in and day out makes it look like the Fed knows what they’re doing to help ‘us’... They do know what they’re doing - but it certainly is not to help ‘us’... and it is not to ‘control’ inflation... And at some point in the not too distant future, the interest due will eat a huge portion of the ‘revenue’ Re: “haven” The defaults are coming ...  The US will not be the first to default... but it will certainly not be the very last to default !! ...Enough casual anti-white racism for the day  ... just sayin’
×
×
  • Create New...

Important Information

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