Stop limit orders in MC strat - EasyLanguage Programming | futures io social day trading
futures io futures trading


Stop limit orders in MC strat
Updated: Views / Replies:6,474 / 13
Created: by aczk Attachments:2

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
 2  
 
Thread Tools Search this Thread
 

Stop limit orders in MC strat

  #1 (permalink)
Elite Member
London, UK
 
Futures Experience: Intermediate
Platform: MultiCharts
Favorite Futures: equities, futures
 
Posts: 36 since Jan 2012
Thanks: 3 given, 2 received

Stop limit orders in MC strat

Hi
Trying to get this to work:

After buy signal on bar one, submit a stop limit order at the high price of the signal bar for the next bar, to catch a breakout.

If the stoplimit order is submitted but not filled after lets say 2 bars, then I want to cancel it.

thx appreciate any feedback!

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
near Paris, France
 
Futures Experience: Beginner
Platform: -
Favorite Futures: -
 
Nicolas11's Avatar
 
Posts: 1,070 since Aug 2011
Thanks: 2,232 given, 1,729 received


Hi!

What is your current code?

Nicolas

Envoyé depuis mon GT-I9100 avec Tapatalk

Reply With Quote
 
  #4 (permalink)
Elite Member
London, UK
 
Futures Experience: Intermediate
Platform: MultiCharts
Favorite Futures: equities, futures
 
Posts: 36 since Jan 2012
Thanks: 3 given, 2 received

!

inputs: SellBars(3),Threshold (10);

value1=ThreeBarPattern(0);

if value1 < Threshold and marketposition = 0 then buy next bar at high stop high limit ;


if value1 < Threshold and marketposition = 0 then sellshort next bar at low stop low limit;


setexitonclose;
setbreakeven(75);


Basic skeleton code for now, stuck on the stoplimiting!

Signal bar is determined by value1 then I want to buy/short the breakout of the next bar with a limit stop just above/below the signal bar's high/low. On the picture the lines indicate pretty much what the limit order are meant to catch. So should be stop limits right!?!?

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
 
  #5 (permalink)
Elite Member
near Paris, France
 
Futures Experience: Beginner
Platform: -
Favorite Futures: -
 
Nicolas11's Avatar
 
Posts: 1,070 since Aug 2011
Thanks: 2,232 given, 1,729 received

OK.

Do you really need a stop-limit entry? Isn't a stop entry enough?

Anyway, what exactly does not work? In other words: what is the problem?
The orders are not executed?
You just want to add the feature "after 2 bars, cancel it"?

Nicolas

Reply With Quote
 
  #6 (permalink)
Elite Member
near Paris, France
 
Futures Experience: Beginner
Platform: -
Favorite Futures: -
 
Nicolas11's Avatar
 
Posts: 1,070 since Aug 2011
Thanks: 2,232 given, 1,729 received

In order to help you, below please find an example of code.

The signal is: two HH in a row (= 2 bars with a H higher than the bar before)
In case of signal, entry long next bar with a stop order at the H of the current bar (your breakout)
The signal is valid for 3 bars (the entry level remains the H of the signal pattern, not the H of the last bar).

I do not say that this code is perfect. I've prepared it in 10 minutes. But it can give you food for thought.

Nicolas


Quoting 
Inputs:
NumberBarsLimit ( 4 ),
TextBold ( true ),
TextColor ( red ),
TextOffsetInTicks ( 4 );

Variables:
TickSize ( MinMove / PriceScale ),
NumberOfBarsSinceBuySetup ( 0 ),
SetupHigh ( 0 );

// if we already have an open long position, no need to count:
if MarketPosition = 1 then begin
NumberOfBarsSinceBuySetup = 0;
end;

// increase the counter of bars since the setup was identified:
if NumberOfBarsSinceBuySetup > 0 then begin
NumberOfBarsSinceBuySetup = NumberOfBarsSinceBuySetup + 1;
end;

// if the counter reaches its limit, put it back to zero:
if NumberOfBarsSinceBuySetup = NumberBarsLimit then begin
NumberOfBarsSinceBuySetup = 0;
end;

// setup = buy after two HH in a row:
if MarketPosition = 0 AND NumberOfBarsSinceBuySetup = 0 AND H > H[1] AND H[1] > H[2] then begin
NumberOfBarsSinceBuySetup = 1;
SetupHigh = High;
end;

// entry long:
if MarketPosition = 0 AND NumberOfBarsSinceBuySetup > 0 then Buy next bar at SetupHigh stop;

// exit after two bars:
if MarketPosition = 1 AND BarsSinceEntry >= 2 then Sell next bar at market;

// display the value of the counter on the screen:
if NumberOfBarsSinceBuySetup > 0 then begin
Value2 = Text_New_s(Date, Time_s, L - TextOffsetInTicks * TickSize, NumToStr(NumberOfBarsSinceBuySetup, 0));
Text_SetColor(Value2, TextColor);
Text_SetAttribute(Value2, 1, TextBold);
end;

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
The following 4 users say Thank You to Nicolas11 for this post:
 
  #7 (permalink)
Elite Member
London, UK
 
Futures Experience: Intermediate
Platform: MultiCharts
Favorite Futures: equities, futures
 
Posts: 36 since Jan 2012
Thanks: 3 given, 2 received

thx for this. but doesn't this strat just place a stop buy order at the high.

I am looking to put a buy limit order at that spot!

Reply With Quote
 
  #8 (permalink)
Elite Member
near Paris, France
 
Futures Experience: Beginner
Platform: -
Favorite Futures: -
 
Nicolas11's Avatar
 
Posts: 1,070 since Aug 2011
Thanks: 2,232 given, 1,729 received

Hi @aczk,

Could you kindly clarify?

1. Do you want to place
(a) a limit order (as you said in that message)
or
(b) a stop limit order (as you said in the first message of the thread)?

2. If (b), the stop and the limit orders are both are High of the current bar?

Nicolas

Reply With Quote
 
  #9 (permalink)
Elite Member
London, UK
 
Futures Experience: Intermediate
Platform: MultiCharts
Favorite Futures: equities, futures
 
Posts: 36 since Jan 2012
Thanks: 3 given, 2 received

1 (a) to buy highs a stop limit order as we are still below that price!
2 at the high of this bar
thx

Reply With Quote
 
  #10 (permalink)
Elite Member
near Paris, France
 
Futures Experience: Beginner
Platform: -
Favorite Futures: -
 
Nicolas11's Avatar
 
Posts: 1,070 since Aug 2011
Thanks: 2,232 given, 1,729 received


Hi,

I'm lost. You refer to 1.(a) and "stop limit order" whereas "stop limit order" was 1.(b).
Sorry about my questions: I just want to understand what you want, and it is still unclear.

Nicolas

Reply With Quote

Reply



futures io > > > > > Stop limit orders in MC strat

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
Market orders vs limit Twiddle Traders Hideout 4 February 9th, 2012 10:54 PM
MC - Coding for Stop Limit Order arjfca The Elite Circle 2 January 25th, 2011 06:18 AM
Catching breakouts using OCO stop limit bracket orders for entries dennho Traders Hideout 4 October 1st, 2010 09:51 AM
Limit Orders COTtrader Traders Hideout 17 August 22nd, 2010 03:24 PM
A little trouble with limit orders... BigDog NinjaTrader Programming 8 June 21st, 2009 08:07 PM


All times are GMT -4. The time now is 03:52 AM.

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.13 seconds with 20 queries on phoenix via your IP 54.226.113.250