Multiple limit target orders - futures io
futures io futures trading



Multiple limit target orders


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Quick Summary with 1 posts (0 thanks)
    2. looks_two toddma with 1 posts (0 thanks)
    3. looks_3 Pritch with 1 posts (0 thanks)
    4. looks_4 josh with 1 posts (0 thanks)
    1. trending_up 2,216 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 4 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

Multiple limit target orders

(login for full post details)
  #1 (permalink)
vancouver canada
 
Experience: Intermediate
Platform: multicharts, ninjatrader
Trading: forex
 
toddma's Avatar
 
Posts: 53 since Jul 2012
Thanks: 14 given, 6 received

Does anyone know why setting up limit order exits based off of the entry price as shown below is not working
(note: I am using two separate entries of 100000 units - so the entry prices should be different...)

LT1 and LT2 are "limit target" variables


if marketposition = 1 and currententries = 2 then begin
LT1 = entryprice*(1+.005);
LT2 = entryprice*(1+.006);
sell ("LT1") currentshares/2 shares next bar at LT1 limit;
sell ("LT2") currentshares/2 shares next bar at LT2 limit;
end;


I have tried incorporating the code right after the buy order like so (see below) and that hasn't worked either:


....
buy ( "1S" )100000 shares next bar at market;
LT1 = entryprice*(1+.005);
sell ("LT1") currentshares/2 shares next bar at LT1 limit;
end;

buy ( "2S" )100000 shares next bar at market;
LT2 = entryprice*(1+.005);
sell ("LT2") currentshares/2 shares next bar at LT2 limit;
end;

Any help would be greatly appreciated. Thanks!

Started this thread Reply With Quote

Journal Challenge February 2021 results:
Competing for $1500 in prizes from Topstep
looks_oneSBtrader82 's Trading Journalby SBtrader82
(173 thanks from 31 posts)
looks_twoJust BEING a Trader: Letting Go!!by iqgod
(120 thanks from 33 posts)
looks_3Wisdom is Emptinessby Mtype
(68 thanks from 25 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(35 thanks from 17 posts)
looks_5Journal for peanuts1956by peanuts1956
(23 thanks from 13 posts)
 
 
(login for full post details)
  #3 (permalink)
Legendary Market Wizard
Georgia, US
 
Experience: None
Platform: SC
Broker: AMP+CQG
Trading: ES, HSI, Nikkei
 
josh's Avatar
 
Posts: 5,466 since Jan 2011
Thanks: 6,054 given, 14,504 received


You will probably want to post this in an appropriate forum. What kind of code is it? What trading software? Find the correct subforum and you will get some replies I'm sure.

Reply With Quote
 
(login for full post details)
  #4 (permalink)
 
 
Posts: 2,230 since Apr 2013
Thanks: 409 given, 1,471 received

toddma,

what is the result you are getting, if you say it is not working?
One issue with entryprice can be that it doesn't have the value of the current entry at the time you are using it.
Meaning in your second code part, I am pretty sure that entryprice still contains the entry price for the previous problem.
To better help you I would need to see what it does on the chart for example. As not working can mean a wide range from do nothing to do something, but not what is intended etc. (depending on what the person means with do nothing).

Regards,
ABCTG


toddma View Post
Does anyone know why setting up limit order exits based off of the entry price as shown below is not working
(note: I am using two separate entries of 100000 units - so the entry prices should be different...)

LT1 and LT2 are "limit target" variables


if marketposition = 1 and currententries = 2 then begin
LT1 = entryprice*(1+.005);
LT2 = entryprice*(1+.006);
sell ("LT1") currentshares/2 shares next bar at LT1 limit;
sell ("LT2") currentshares/2 shares next bar at LT2 limit;
end;


I have tried incorporating the code right after the buy order like so (see below) and that hasn't worked either:


....
buy ( "1S" )100000 shares next bar at market;
LT1 = entryprice*(1+.005);
sell ("LT1") currentshares/2 shares next bar at LT1 limit;
end;

buy ( "2S" )100000 shares next bar at market;
LT2 = entryprice*(1+.005);
sell ("LT2") currentshares/2 shares next bar at LT2 limit;
end;

Any help would be greatly appreciated. Thanks!


Follow me on Twitter Reply With Quote
 
(login for full post details)
  #5 (permalink)
Denver Colorado
 
 
Posts: 4 since Aug 2013
Thanks: 1 given, 0 received


toddma View Post
Does anyone know why setting up limit order exits based off of the entry price as shown below is not working
(note: I am using two separate entries of 100000 units - so the entry prices should be different...)

LT1 and LT2 are "limit target" variables


if marketposition = 1 and currententries = 2 then begin
LT1 = entryprice*(1+.005);
LT2 = entryprice*(1+.006);
sell ("LT1") currentshares/2 shares next bar at LT1 limit;
sell ("LT2") currentshares/2 shares next bar at LT2 limit;
end;


I have tried incorporating the code right after the buy order like so (see below) and that hasn't worked either:


....
buy ( "1S" )100000 shares next bar at market;
LT1 = entryprice*(1+.005);
sell ("LT1") currentshares/2 shares next bar at LT1 limit;
end;

buy ( "2S" )100000 shares next bar at market;
LT2 = entryprice*(1+.005);
sell ("LT2") currentshares/2 shares next bar at LT2 limit;
end;

Any help would be greatly appreciated. Thanks!

When using entryprice you want to specify which entry: for instance entryprice(0) = current entry... Or entryprice(1) for 1 entry ago... Hope this helps.

Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Multiple limit target orders


Last Updated on August 29, 2013


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Call Option Buying: The New Pain Trade? w/Carley Garner

Elite only
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

New Challenge (TBD)

April
     



Copyright © 2021 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