NexusFi: Find Your Edge


Home Menu

 





Intraday stop under yesterday day low


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Orjan with 3 posts (2 thanks)
    2. looks_two skiman721 with 2 posts (1 thanks)
    3. looks_3 Lampert with 2 posts (3 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 3,568 views
    2. thumb_up 6 thanks given
    3. group 2 followers
    1. forum 6 posts
    2. attach_file 0 attachments




 
Search this Thread

Intraday stop under yesterday day low

(login for full post details)
  #1 (permalink)
Orjan
Stockholm Sweden
 
Posts: 20 since Apr 2012
Thanks Given: 12
Thanks Received: 2

I'm anayzing in 120 minutes and want my Stop Loss one tick under the low of:

- the day before the day I enter the trade

...or

- the same day I enter the trade

....whichever is lowest.


The stop should be there all the time, until the profit target or the stop is reached. I have tried with this:

If Marketposition = 1 and low < lowD(1) then exitlong

but then the stop is trailing, which I don’t want.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
SPY ETF Question
Stocks and ETFs
IQFeed MBO data experience
The Elite Circle
Volume profile TradeStation
EasyLanguage Programming
Request for MACD with option to use different MAs for fa …
NinjaTrader
ISO Equity Curve Indicator
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Supertradersams Thread Journal on NQ/MNQ
27 thanks
GFIs1 1 DAX trade per day journal
23 thanks
Diary of a simple price action trader
17 thanks
Daytrading ES & NQ
14 thanks
Tao te Trade: way of the WLD
13 thanks

(login for full post details)
  #3 (permalink)
 skiman721 
North Bay
 
Experience: Intermediate
Platform: NT, ToS, MulitCharts
Broker: NT, TD
Trading: ES, CL
Posts: 39 since Nov 2011
Thanks Given: 10
Thanks Received: 9



Orjan View Post
I'm anayzing in 120 minutes and want my Stop Loss one tick under the low of:

- the day before the day I enter the trade

...or

- the same day I enter the trade

....whichever is lowest.


The stop should be there all the time, until the profit target or the stop is reached. I have tried with this:

If Marketposition = 1 and low < lowD(1) then exitlong

but then the stop is trailing, which I donít want.


Try something like this for 1 tick less than yesterdays low

 
Code
                            
varsticksize    MinMove PriceScale );


if 
marketposition 1 then begin
    Sell next bar At CloseD
(1) - (ticksizelimit;
end

Reply With Quote
The following user says Thank You to skiman721 for this post:
(login for full post details)
  #4 (permalink)
 
Lampert's Avatar
 Lampert 
Calgary, Canada
 
Experience: Intermediate
Platform: Multicharts
Broker: IB, IQFeed
Trading: GC
Posts: 76 since Nov 2011
Thanks Given: 73
Thanks Received: 142


Orjan View Post
I'm anayzing in 120 minutes and want my Stop Loss one tick under the low of:

- the day before the day I enter the trade...or- the same day I enter the trade....whichever is lowest.

The stop should be there all the time, until the profit target or the stop is reached. I have tried with this:

If Marketposition = 1 and low < lowD(1) then exitlong but then the stop is trailing, which I donít want.

Orjan - This statement will sell at the lower of the two prices. This assumes the Day is defined from midnight to midnight. It is more complex if you want different session times.

If you are not already using, you should consider use of the Intrabar Order Generation. For backtesting, the Bar Magnifier should be used.
 
Code
If MarketPosition = 1 then Sell next bar at MinList ( LowD(0) , LowD(1)) - TickSize Stop ;
Len

Reply With Quote
The following user says Thank You to Lampert for this post:
(login for full post details)
  #5 (permalink)
Orjan
Stockholm Sweden
 
Posts: 20 since Apr 2012
Thanks Given: 12
Thanks Received: 2

skiman and Lampert,

Thanks, maybe I was unclear. I want the stop to stay at the same price every day until exit. If I buy july 3 I want the stop to stay one tick under the lowest of july 2 and 3, even july 4, 5, 6 and so on as long as I have no exit .... I don't want a trailing stop.

I take care of the trailing with another signal.

Reply With Quote
The following user says Thank You to Orjan for this post:
(login for full post details)
  #6 (permalink)
 
Lampert's Avatar
 Lampert 
Calgary, Canada
 
Experience: Intermediate
Platform: Multicharts
Broker: IB, IQFeed
Trading: GC
Posts: 76 since Nov 2011
Thanks Given: 73
Thanks Received: 142


Orjan View Post
skiman and Lampert,

Thanks, maybe I was unclear. I want the stop to stay at the same price every day until exit. If I buy july 3 I want the stop to stay one tick under the lowest of july 2 and 3, even july 4, 5, 6 and so on as long as I have no exit .... I don't want a trailing stop.

I take care of the trailing with another signal.

OK, Orjan. You may have solved the problem but here is some code that will hold a constant stop price after the position is opened.
 
Code
If MarketPosition = 0 then StopPrice = MinList ( LowD(0) , LowD(1)) - TickSize ;

If MarketPosition = 1 then Sell next bar at StopPrice Stop ;
Len

Reply With Quote
The following 2 users say Thank You to Lampert for this post:
(login for full post details)
  #7 (permalink)
Orjan
Stockholm Sweden
 
Posts: 20 since Apr 2012
Thanks Given: 12
Thanks Received: 2

Perfect Len! It works

I replaced "Sell" with "Exitlong"

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





Last Updated on June 24, 2012


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts