NexusFi: Find Your Edge


Home Menu

 





Sell Short when over 10EMA, cover at 5% less


Discussion in EasyLanguage Programming

Updated
    1. trending_up 1,339 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

Sell Short when over 10EMA, cover at 5% less

  #1 (permalink)
 magik570 
LAWRENCEVILLE
 
Experience: Beginner
Platform: Tradestation
Trading: Emini ES, Crude CL
Posts: 7 since Jun 2017
Thanks Given: 5
Thanks Received: 0

Would like build a strategy on 5 min stock chart (UVXY) to Sell Short when last traded price is more 9EMA with 2% Stop Loss and cover at 5% gain (when price hits 5% less than short sell price).

Can someone please help?

There needs to be short, stop, cover and exit at the end of the day.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Quantum physics & Trading dynamics
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
 
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629


magik570,

īt depends a bit on what you mean with "when last traded price is more 9EMA", as there is a difference between price being above (which could be the case for several bars in a row) and price crossing above.
Take a look at the build in "MovAvg Cross LE" and "MovAvg Cross SE" strategies for an example of a strategy that takes an entry when price is above/below a simple moving average for X bars.

The build in "MACD LE" and "MACD SE" strategies demonstrate how to trigger an entry based on the cross over.

Either of these should help get you going for your entry. In case you need an example for how to call an exponential moving average, the build in "Mov Avg Exponential" indicator should be helpful.

For the end of day exit in backtesting take a look at the reserved word SetExitOnClose.

You will also need to compute your exit prices based on the entry into the trade (which you can get with the reserved word EntryPrice) and issue exits at these prices using BuyToCover (take a look at the build in platform help in case you need an example for how to use any of the reserved words).

Regards,

ABCTG

Follow me on Twitter Reply With Quote




Last Updated on July 7, 2017


© 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