NexusFi: Find Your Edge


Home Menu

 





Time-out stop loss help


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one zwanatico with 3 posts (0 thanks)
    2. looks_two prouser with 2 posts (0 thanks)
    3. looks_3 Jacare with 1 posts (0 thanks)
    4. looks_4 TraderFx1 with 1 posts (0 thanks)
    1. trending_up 2,124 views
    2. thumb_up 0 thanks given
    3. group 4 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

Time-out stop loss help

  #1 (permalink)
zwanatico
Chicago
 
Posts: 3 since Nov 2014
Thanks Given: 0
Thanks Received: 0

Hello. I am trying to code a time-out stop loss.
Suppose a system generates a buy signal after price crossover a specific moving average.
If after that buy signal, the higher of next x days is lower than the high of the day of the buy signal, then close position at close of that day (x).
Is it possible using N-bar stop loss function? Can you help me with coding?
Thank you!

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
What broker to use for trading palladium futures
Commodities
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
How to apply profiles
Traders Hideout
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
 
  #2 (permalink)
 prouser 
Zurich/Switzerland
 
Posts: 79 since Oct 2014


zwanatico View Post
Hello. I am trying to code a time-out stop loss.
Suppose a system generates a buy signal after price crossover a specific moving average.
If after that buy signal, the higher of next x days is lower than the high of the day of the buy signal, then close position at close of that day (x).
Is it possible using N-bar stop loss function? Can you help me with coding?
Thank you!

Should be possible by combining with check of price at buy.

Reply With Quote
  #3 (permalink)
zwanatico
Chicago
 
Posts: 3 since Nov 2014
Thanks Given: 0
Thanks Received: 0


Yes, and maybe with Ref(C,...) function, but I am not very good in Amibroker coding. Can you help me?
Thank you.

Reply With Quote
  #4 (permalink)
 prouser 
Zurich/Switzerland
 
Posts: 79 since Oct 2014

You wanna exit at profit target I guess for example x-ticks above high of entry bar. And in addition you want to add a time stop. So for example it's one Applystop with stoptypeprofit and another one with stoptypenbar. Or you can create stops via looping.

Reply With Quote
  #5 (permalink)
zwanatico
Chicago
 
Posts: 3 since Nov 2014
Thanks Given: 0
Thanks Received: 0

Hello. I am trying to add an additional exit rule to the classic MA cross over price system. Maybe an example can clarify this exit rule (I've chosen 3 days, but the idea should be adaptable to x days):

day 0 (signal): high 11, low 8.5, close 9.5, MA 9 open long (because close>MA)
day 1: high 10.5, low 7.5, close 8.8, MA 8.5 keep long position (because close>MA)
day 2: high 10.7, low 8, close 9, MA 8.8 keep long position (because close>MA)
day 3: high 10.2, low 7.8, close 9.5, MA 9 close position (because higher from day 1 to day 3 is lower than high of day 0).

On day 3, altough close is ABOVE MA, I would like to EXIT position (sell), because higher from day 1 to day 3 (10.7) is LOWER than high of day 0 (11).
I only need help on coding the lower higher exit rule (time out exit rule).
Thank you.

Reply With Quote
  #6 (permalink)
Jacare
Munich Germany
 
Posts: 10 since Jan 2014
Thanks Given: 1
Thanks Received: 2

Could you post here what you wrote until now?

Cheers,

Jacare

Reply With Quote




Last Updated on November 25, 2014


© 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