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

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