place multiple stoploss/limit orders based on entry price - EasyLanguage Programming | futures io social day trading
futures io futures trading

place multiple stoploss/limit orders based on entry price
Updated: Views / Replies:4,535 / 2
Created: by bermondsey 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 100,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

Thread Tools Search this Thread

place multiple stoploss/limit orders based on entry price

  #1 (permalink)
Trading Apprentice
London, UK
Trading Experience: Intermediate
Platform: TradeStation
Favorite Futures: European futures
Posts: 2 since Oct 2013
Thanks: 1 given, 0 received

place multiple stoploss/limit orders based on entry price

hi everyone,

i tried to incorporate a methodology into my strategy that had been described by Big Mike in one of his tutorials (VIDEO TUTORIAL: How to create an advanced MultiCharts EasyLanguage Strategy ). based on the entry price the strategy should come up with multiple stop loss and limit (take profit) orders. to keep it simple i am for now only trading one contract and therefore for each trade the strategy will only place one stoploss and one takeprofit order. i've been trying to get my head around the following problem for the past few hours but couldn't find any solution to it:

whereas the system enters a long/short position ok, it seems like when calculating stoploss and take profit level the strategy might not be using the correct entry price. it seems to be closing out trades on a rather random basis.

(for additional info i'm backtesting on FGBL futures and i am using a 1min chart).

please see code below:

inputs: stopsize(8), tp (10);

vars: ticksize (minmove/pricescale), tgt1 (tp*ticksize), st1(0), longentryprice(0), shortentryprice(0);

//enter position (only at the close of bar):

if barstatus(1) = 2 then begin

if marketposition = 0 and condition1 then
buy("enter long") next bar 1 contracts at close limit;
longentryprice = entryprice;

if marketposition = 0 and condition2 then
sellshort ("enter short") next bar 1 contracts at close limit;
shortentryprice = entryprice;


// trade management (which is causing issues):

if marketposition <> 0 then begin

if marketposition =1 then
st1 = longentryprice - (stopsize*ticksize);

sell ("longtarget_hit") 1 contracts next bar at (longentryprice + tgt1) limit;
sell ("longstop_triggered") 1 contracts next bar at st1 stop;

if marketposition = -1 then
st1 = shortentryprice + (stopsize*ticksize);

buytocover ("shorttarget_hit") 1 contracts next bar at (shortentryprice- tgt1) limit;
buytocver ("shortstop_triggered") 1 contracts next bar at st1;


any help much appreciated,



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)
Hamburg Germany
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
Posts: 1,887 since Apr 2013
Thanks: 311 given, 1,168 received

I have just loaded your code into Multicharts and it seems to exit where I would expect it to do it.
Can you show some examples of trades that are exited at wrong prices?


Reply With Quote
The following user says Thank You to ABCTG for this post:


futures io > > > > > place multiple stoploss/limit orders based on entry price

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Journal Challenge $1600 in Prizes & Free Journalytix for all participants!


3 Excellent Entries, and How To Automate Them w/Kevin Davey

Feb 21

The Driving Force Behind the Market w/Earn2Trade

Mar 5

TBA w/Stage5 & iSystems

Mar 12

TBA w/John Grady @ No BS Day Trading

Mar 19

Day Trading Oil Futures: Reducing Risk & Increasing Profits w/DTN IQFeed

Mar 26

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple limit target orders toddma EasyLanguage Programming 4 August 29th, 2013 06:40 PM
can i place limit order, target price, & protective stop simultaneously shots fired ThinkOrSwim 4 June 22nd, 2013 04:31 AM
Entry, Stoploss, Profit target baruchs Emini Index Futures Trading 15 March 3rd, 2013 10:44 AM
Is MC able to backtest strategies based on multiple range-bar-based frames? theorist MultiCharts 5 December 5th, 2012 12:36 PM
Using Limit entry, how to know if entry was execute - Multicharts arjfca EasyLanguage Programming 11 November 24th, 2010 05:33 PM

backtesting, code, dom, easylanguage, fgbl, futures, how to, information, limit orders, marketposition, multicharts, neoticker, orders, short, stop loss, stoploss, strategy, take profit, trade management, tradestation, trading

All times are GMT -4. The time now is 05:38 AM. (this page content is cached, log in for real-time version)

Copyright © 2019 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432 WhatsApp Business,
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 2019-02-20 in 0.19 seconds with 14 queries on phoenix