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.

Tradewinds

Market Wizard
  • Content Count

    911
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Tradewinds

  1. BUY TO OPEN: If you see the option to 'Buy to Open', and you don't know what it is, but it sounds good, then you need to understand that it's for entering an options order, not Stocks or Futures. The same thing with Buy to Close, Sell to Open, Sell to Close. These are all order entry types for options. For Futures, all there is, is BUY or SELL. With Stocks, there is Buy (Long), Sell (Exit Long), Sell Short (Short), Buy to Cover (Close the Short).
  2. PEG ORDERS: A peg order is interesting because it will fill at one of two prices. Only one of the prices displays in the Market Depth Window. So you are effectively hiding the second price. The issue is really about what you are willing to pay, but trying to get a better price. You can PEG the order at a better price than you are willing to fill at. So you are hiding your worst case fill price, and displaying the best case fill price. So the PEG order is really hiding your true willingness to take a worse price than you are displaying. The TradeStation HELP states that this order is helpful in a fast/volatile market. I guess that in a volatile market, the price could go to a much better fill price extremely fast, and you wouldn't want to get filled at the worse price.
  3. OSO (Order Sends Order) Once the first order is filled, a second order gets sent to the market. Actually, you can have multiple subsequent orders sent to the market.
  4. JOIN: Buy Join sets a Limit Price to the best Ask price. Sell Join sets a Limit Price to the best Bid price. So you are willing to buy at whatever they are Asking and selling at the Bid price.
  5. If-Touched: Have you ever wanted to enter a market order to close, but at a better price than the current price. In other words, enter a Market Order to close a long order at a profit, but above the current price? Well, you can't do that unless you use an 'If-Touched' advanced order. You can place Market Stops to enter an order at a worse price than presently, and you can enter a Market Stop as a Stop Loss, but you can't enter a Market Stop to close at a profit AT A BETTER PRICE without using an advance order. This is where the 'If-Touched' advanced order comes in. The problem with advanced orders, is that they take time to set up. If you are doing high frequency trading, you don't have time to configure an order, enter the price and check boxes and options before you send the order. If you have a specific target in mind, and want an instant fill at market when that price is touched, and you have time to configure the order, then this might be what you want to look into. Otherwise, you'll need to program code to configure the order and send it.
  6. I use TradeStation, and I have used the Ninja trial offer for a month. So I don't have an in-depth understanding of Ninja. I guess I find TradeStation charts and graphics more appealing, but it's just a personal preference.
  7. Hide your order amount: Tradestation allows you to hide your real order amount: They are called 'Non-Display Orders'
  8. This thread is dedicated to order types. I'll start by listing an order type that I did not know about. This is from the TradeStation help. You can set your order to only execute on upticks or downticks.
  9. You can also retrieve the current Price Style for an order. Here is the list: PriceStyle Lists the types of auto price settings for an order. Namespace: tsdata.trading Enumerated Values Name Value HitOrTake 5 HitOrTakePlus 6 IfTouchPlus 9 Improve 2 Join 1 None 0 ParentPlus 7 Shave 4 Split 3 StopPlus 8 An IfTouch order will allow you to place a Market order that does not execute unless the price touches a certain price. HitOrTake executes a market order immediately I believe.
  10. This thread is dedicated to Object-Oriented Order Management in TradeStation. I'll start by listing the different OrderStates that can be retrieved using OO in EL. I'm not sure that any of this can be done with the procedural programing in EL. I've looked through the Reserved Words, and haven't seen any way to retrieve the following order status info except through OO. OrderState Indicates the state of an order as it is being processed. Namespace: tsdata.trading Enumerated Values Canceled 9 Cancelpending 10 Expired 12 Filled 8 Partiallyfilled 6 Partiallyfilledurout 7 Queued 5 Received 4 Rejected 11 Sendfailed 3 Sending 1 Sent 2 unsent 0 So, with OOP in EL, I can have the code check for whether the order was sent, received, rejected or filled. I don't think I can do any of that except with OOP.
  11. 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.
  12. Oh! Really! I'll have to check that out! tsdata.Trading.OrderTicket This is the Object Oriented TradeStation code example. { This example uses an OrderTicket component to send a Buy at Market order for the current stock symbol based on a specified account and quantity. All of the order properities must consistent with the asset class of the symbol. NOTE: After inserting an indicator containing an order object to an analysis window, you'll need to go to the Format-General tab and check 'Enable order placements objects' to allow orders to be sent from the indicator. You'll need to enter your own equities account number and change the quanitity as appropriate. To place the order, change the PlaceOrderNow input to TRUE. Once set to TRUE, orders will also be sent when a RadarScreen refresh occurs. The following items were created or modified: Component tray: OrderTicket1 dragged into document from the Toolbox Properties editor: Symbol assigned to current Symbol (current row in RS). Properties editor: Account and Quantity get their values from inputs These additional properties specify related order assumptions: Properties editor: SymbolType set to Stock (must compatible with the asset type of the account) Properties editor: Action set to Buy Properties editor: Type set to Market Properties editor: Duration set to Day } Input: string iAccount1( "Enter Your Equities Account Number" ), int iQuantity1(100), PlaceOrderNow(FALSE); {The MyOrder variable will refer to the Order instance after the order is sent} 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;
  13. I've got a couple of threads started at the TradeStation EasyLanguage site about the issue of conditions getting met multiple times per bar. I'm having this problem with multiple indicators that I use. So, for now, placing a real order through an indicator isn't viable. Even if I designate the frequency parameter setting to 'OncePerBar', I'm still getting multiple orders firing all at once.
  14. 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.
  15. 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.
  16. 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?
  17. 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.
  18. I don't doubt that there is a high attrition rate, as with many things. I'm a perfectionist, so I want real good answers. But, in this life, good answers seem difficult to find. Out of a "sea" of information, one thing may fit a problem well. From class two, I've realized that I don't confront those negative thoughts and beliefs that are so entrenched in my thinking and feelings. For me, the concept of confronting the negative thoughts and beliefs really gave me a feeling of hope that I can make a change. Realizing that I do NOT confront negative and false feelings, thoughts and beliefs is just a simple fact. It's very "straight forward", very basic, and a real "no brainer", but even so, it's an issue that is not being addressed. It makes sense to me, and if it makes sense to me, and it's a well defined problem, and it's not real complicated, then I feel like I've got something I can "work with". It's a starting point. I can simply keep working on the simple reality that I let negative and even untruthful thoughts guide my life, and it really doesn't make any sense to give them so much power. That makes sense to me. it's not that I'm a believer in positive thinking. I think some people use the concept of positive thinking to avoid facing the negative. So it just turns into an exercise in self-deception. BUT, there is no point in letting negative and untruthful thoughts and feelings control me. That's just reality to me. I can accept that. It's okay for me to be confrontational with negative and untruthful feelings and thoughts about myself. For whatever reason, I find this truth makes me feel better, more upbeat, and feel like I now have something that I can work on that will really make a difference. I think that confronting these things in myself is extremely important. If I had not taken class 2, then I would not have gotten this nugget of truth that could be 'key' in making a real difference. So in that sense, it's invaluable. It gives me something to 'latch on to'. I do what I can, and stay open to whatever good answers may come my way. I won't be the perfect student, and I don't try to be. (I'm a perfectionist, with streaks of pragmatism) :rofl: I plan on replaying the classes multiple times.
  19. This thread is dedicated to understanding and discussing the basics of Object-Oriented Programming. Tutorial from Java What is an object? Oracle.com [ame=http://www.youtube.com/watch?v=c5kfCH50wl0]You Tube[/ame]
  20. I just made the first post as the owner of the group. Posts are not open to the public, only members can view posts. Members must be approved. The yahoo group is not meant to be a substitute for this thread, or a diversion from this forum. It's a place for members only to be part of a private group dedicated to this subject.
  21. Here is a link to the group I just set up. People can join only with my approval. Only group members can post to the group. (Private discussion group) If someone does not want to post to the private group, they can simply make a post here. Post will not be approved, and will be posted immediately, but I won't hesitate to delete anything that I feel is not constructive. TradersStateOfMind : Trader's State of Mind I set the group up, so I'm the owner. I run the show. But if anyone wants to be a moderator, or become owner of the group, just let me know.
  22. There are successful traders who didn't become successful until 2 or more years into trading. I've heard enough stories to believe that it takes at least a couple of years. How much time are you putting into trading? Full time? You are doing exactly what every new trader does. It's not bad, it just seems to be part of the journey. I guess it's important to quickly learn what doesn't work. You don't want to be 2 years into some method and figure out it's not for you. When I first got an account I was putting 12 mini charts on my screen, and trying to watch scrolling news feeds, and trying to make sense of all the information, and I realized that I just can't operate that way. Maybe other people can, but I couldn't, and I have no desire to. I would pick ONE thing to trade, and practice trade it until you can make money very consistently. That's just my opinion.
  23. I suggest that a yahoo group get created for discussing things specific to the course. Don't stop discussing things here, just have a separate yahoo group for the course. Yahoo groups are free. I've created groups before. With the yahoo group the members would be specifically committed to an objective, and the discussion could be more in depth. Some forums and groups have the capability of have sub groups of members. So you're a member of the site, but you could also be in a private group within the group. This thread is open to everyone. That's not bad, but there are times when being in a smaller, more "private" group is appropriate.
  24. aiLeftDispDateTime = Identifies date and time of the first (leftmost) bar displayed on the chart. Returns a DateTime(double) value when called from a chart otherwise returns 0. Here is some simple code that displays the output on the chart. I suggest that you separate out things into small sections of code that you can get to work, with some way of seeing what the output is. This indicator shows what the output of the code is in the upper right hand corner of the screen. In the upper right hand corner, it shows the date and time of the first bar on the chart. var: DateString(" "); Once begin Value1 = Text_New( D, T, getappinfo(aiHighestDispValue), " Begin" ); end; DateString = DateTimeToString(getappinfo(aiLeftDispDateTime)); Text_SetString(Value1, DateString); Text_SetLocation(Value1, D, T, getappinfo(aiHighestDispValue) - 0.5); Text_SetStyle(Value1, 0, 2);
  25. Here is the code that I have so far. I have a way of trying to keep the order from firing more than once per bar. As soon as the condition to send the order is met, I set a variable to 'True'. xLngFired = True; The Exit Long Order fired. This variable tells me that the conditions were met, and the order was sent. But I still seem to be getting multiple orders being sent per bar. I'm not sure what is wrong. The following code is not the entire code, it is a representation of the basic structure that I have. In my code I have multiple data sources, six data sources in the same indicator. I don't know if the multiple data sources are causing a problem. I'm just making wild guesses at this point. When I study the code below, it seems like it should prohibit the order from being sent more than once per bar, but it doesn't seem to be working. Input: AccntNum("SIM99999F"), Ticker("ESZ11"); var: QtyOpen(0), xLng(False), xLng1(False), xLng2(False), xShrt(False), xShrt1(False), xShrt2(False), Peak(False), Bttm(False), CrrntHi(0), CrrntLw(0), HigherHigh(False), LowerLow(False), HigherHighData2(False), LowerLowData2(False), IntrabarPersist xLngFired(True), IntrabarPersist xShrtFired(True); Peak = H[1] > H[2]; Bttm = L[1] < L[2]; If Peak then CrrntHi = H[1]; If Bttm then CrrntLw = L[1]; HigherHigh = H > CrrntHi; LowerLow = L < CrrntLw; xLng1 = HigherHigh; xShrt1 = LowerLow; xLng2= HigherHighData2 and HigherHighData2[1] = False; xShrt2 = LowerLowData2 and LowerLowData2[1] = False; xLng = xLng1 or xLng2; xShrt = xShrt1 or xShrt2; If xLng or xShrt then QtyOpen = GetPositionQuantity(Ticker, AccntNum); If xLng and QtyOpen > 0 and xLngFired = False then begin xLngFired = True; // Immediately indicate that the conditions have been met. value1 = MarketOrder("OncePerBar", AccntNum, "Sell", "Future", Ticker, QtyOpen); Condition1 = (PlaySound("c:\Wave\Sell.wav")); End; If xShrt and QtyOpen < 0 and xShrtFired = False then begin xShrtFired = True; value2 = MarketOrder("OncePerBar", AccntNum, "Buy", "Future", Ticker, absValue(QtyOpen)); Condition2 = (PlaySound("c:\Wave\Buy.wav")); End; If Barstatus(1) = 2 then begin // At the end of the bar, reset the variables to False if xLngFired = True then xLngFired = False; if xShrtFired = True then xShrtFired = False; End;
×
×
  • Create New...

Important Information

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