Stop Loss Buy for Entry - EasyLanguage Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > TradeStation > EasyLanguage Programming

Stop Loss Buy for Entry
Started:March 2nd, 2014 (12:29 PM) by tahseen Views / Replies:403 / 2
Last Reply:March 2nd, 2014 (02:08 PM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Stop Loss Buy for Entry

Old March 2nd, 2014, 12:29 PM   #1 (permalink)
Trading Apprentice
Delhi India
Futures Experience: Intermediate
Platform: Meta Trader
Favorite Futures: Gold
Posts: 1 since Feb 2014
Thanks: 0 given, 0 received

Stop Loss Buy for Entry

I am trying to buy 2 pips above the previous candle high when the MACD cross above happens. Code is this

inputs: FastLength( 5 ), SlowLength( 70 ), MACDLength( 100 ) ;
variables: var0( 0 ), var1( 0 ), var2( 0 ) , var3(0);

var0 = MACD( Close, FastLength, SlowLength ) ;
var1 = XAverage( var0, MACDLength ) ;
var2 = var0 - var1 ;
var3 = High[1]+1.0;

condition1 = CurrentBar > 2 and var2 crosses over 0 ;
if condition1 then
Buy( "MacdLE" ) next bar at var3 stop;

But then when I am seeing the buy value, it is showing at High[1] only and not additional 1.0 point above

Can you please help?


Reply With Quote

Old March 2nd, 2014, 12:29 PM   #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.


Old March 2nd, 2014, 02:08 PM   #3 (permalink)
Hamburg Germany
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
Posts: 1,101 since Apr 2013
Thanks: 186 given, 620 received


your code buys for the next market using the high from one bar ago. Which means at the time your order is sent you are using the high from two bars ago. The code is doing that fine and I didn't see wrong entries at High[1] only here.

To avoid issues I would suggest not to use something like High[1] + 1, but use pips/ticks instead like this:
High[1] + (2 * (MinMove/PriceScale))

Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > TradeStation > EasyLanguage Programming > Stop Loss Buy for Entry

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Corey Rosenbloom: Tips, Tactics, and Real Trades: Trading Intraday Trend Reversals

Elite only

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Avoid Loss - Best Entry Points GFIs1 The Elite Circle 10 November 29th, 2013 03:10 AM
Ninjatrader strategy for Trailing Stop and stop loss. skann NinjaTrader 2 August 20th, 2013 07:34 PM
Set Stop loss gerimo NinjaTrader Programming 3 May 24th, 2012 01:36 PM
Rooky questionning, Coding a conditionnal entry + a stop loss if done arjfca EasyLanguage Programming 7 December 13th, 2010 03:10 PM
"Stop If Bid" command for entry's and stop loss arjfca EasyLanguage Programming 4 October 7th, 2010 05:05 PM

All times are GMT -4. The time now is 07:36 AM.

Copyright © 2016 by 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 2016-10-21 in 0.07 seconds with 19 queries on phoenix via your IP