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 Lampert with 2 posts (3 thanks)
    3. looks_3 skiman721 with 2 posts (1 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 3,594 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

  #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?
Exit Strategy
NinjaTrader
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Deepmoney LLM
Elite Quantitative GenAI/LLM
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
38 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
GFIs1 1 DAX trade per day journal
19 thanks
The Program
18 thanks
  #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
Thanked by:
  #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
Thanked by:
  #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
Thanked by:
  #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
Thanked by:
  #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
Thanked by:




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