Need help with understanding simple EL code - EasyLanguage Programming | futures io social day trading
futures io futures trading


Need help with understanding simple EL code
Updated: Views / Replies:365 / 5
Created: by dubi Attachments:0

Welcome to futures io.

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

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

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

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

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Need help with understanding simple EL code

  #1 (permalink)
Trading Apprentice
Switzerland
 
Futures Experience: Intermediate
Platform: none
Favorite Futures: Forex
 
Posts: 2 since Mar 2015
Thanks: 1 given, 1 received

Need help with understanding simple EL code

Hello everyone
This is my first post here and I hope this is the correct sub-forum to addess this. I have been studying various EL introductions but I did not get clarity on some statements.
I am trying to understand some EL-Code in order to translate this to my platform. Since I donít have access to TS to test things out I am reaching out here.
The code is about as follows:

 
Code
If marketposition >= 0 then begin
	Sell short  (ďs1) 1 contract next bar at p1 stop
End
I am reading the above as follows:
if there is no position or current position is long then
enter a short position of one contract as soon as the next bar starts but only if the price is at least as low as p1.
So it will not execute an order in the current bar, right?

Is it also correct that the order remains active until price<=p1? Meaning even if the condition price<=p1 is only met 10 bars later?

Thank you
dubi

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,386 since Jul 2012
Thanks: 1,138 given, 4,384 received



dubi View Post
Hello everyone
This is my first post here and I hope this is the correct sub-forum to addess this. I have been studying various EL introductions but I did not get clarity on some statements.
I am trying to understand some EL-Code in order to translate this to my platform. Since I don’t have access to TS to test things out I am reaching out here.
The code is about as follows:

 
Code
If marketposition >= 0 then begin
	Sell short  (“s1) 1 contract next bar at p1 stop
End
I am reading the above as follows:
if there is no position or current position is long then

enter a short position of one contract as soon as the next bar starts but only if the price is at least as low as p1.

So it will not execute an order in the current bar, right?

Is it also correct that the order remains active until price<=p1? Meaning even if the condition price<=p1 is only met 10 bars later?

Thank you
dubi

if there is no position or current position is long then

enter a short position ORDER of one contract as soon as the next bar starts - to sell short if the price of the next bar is at p1 or below. This order will be active for the entire next bar. If it does not fill during the next bar, it will not renew the order for the next bar unless the condition is evaluated as true again.

So, if this is your whole code, if the order is not filled that next bar, at the end of that bar the code will be reevaluated, and since marketposition is still >=0, the order would be resubmitted.

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote
The following user says Thank You to kevinkdog for this post:
 
  #4 (permalink)
Trading Apprentice
Switzerland
 
Futures Experience: Intermediate
Platform: none
Favorite Futures: Forex
 
Posts: 2 since Mar 2015
Thanks: 1 given, 1 received

That was really speedy - thank you very much!!

This is exactly the clarity I was looking for. Really appreciate your support!

dubi

Reply With Quote
The following user says Thank You to dubi for this post:
 
  #5 (permalink)
Vendor self-promotion
Cyprus
 
Futures Experience: Intermediate
Platform: Multicharts
Favorite Futures: ES
 
Posts: 68 since Jul 2013
Thanks: 15 given, 18 received

Also note that the order will be filled at market if price is below p1. You may want to think about this if you are dealing with daily bars. Maybe you need a stop-limit order.

Reply With Quote
The following user says Thank You to solotrader for this post:
 
  #6 (permalink)
Elite Member
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,386 since Jul 2012
Thanks: 1,138 given, 4,384 received


solotrader View Post
Also note that the order will be filled at market if price is below p1. You may want to think about this if you are dealing with daily bars. Maybe you need a stop-limit order.

That is a good point, if there is a opening gap. The strategy backtest will show a fill at the open price in this case.

In actual trading, though, the order will be rejected at the broker, since you can't enter sell stop orders that are above the market.

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote

Reply



futures io > > > > > Need help with understanding simple EL code

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need simple code for StochRSI please TraderTom NinjaTrader Programming 5 May 6th, 2014 06:36 PM
Need a simple code added to this indie PandaWarrior NinjaTrader Programming 4 January 21st, 2014 10:50 AM
Need help understanding connections and relationships; simple conditional accumulator aventeren NinjaTrader Programming 4 May 24th, 2013 05:30 PM
Convert this NT code to EL, Please lizmerrill EasyLanguage Programming 8 January 20th, 2011 02:33 PM
Missing something very simple on my code sharp2be NinjaTrader Programming 5 May 22nd, 2010 11:40 PM


All times are GMT -4. The time now is 09:08 PM.

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