autotrade
Custom scripting, Indicators & automated strategies for Pathfinder.

How to exit trade after X Pips from entry

This script show how to exit a trade after x pips from entry.

The entry conditions, in this example, are based on sma cross.

 

The Script  code for download: PipsCount Exit

Important Disclaimer: The code or software herein contained or attached, including but not limited to Custom indicators, PathScript, Expert Advisors, EAs, and any other Scripts (“Software”), are provided “As Is” and are intended to be used for informational and educational purposes only. The Software is provided by FastBrokers and/or its employees or affiliates (“FastBrokers”) as a courtesy service to its customers and it is intended for informational and educational purposes only and under no circumstances should be regarded as investment advice or as a solicitation or an offer to sell/buy any financial product. FastBrokers assumes no responsibility or liability from gains or losses incurred by the performance of the Software provided. No representation is being made that any account will or is likely to achieve any particular profits or losses. In fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular Software. Hypothetical trading does not involve financial risk, and no hypothetical trading record can completely account for the impact of financial risk in actual trading. The Software cannot be guaranteed to be error-free, thus may cause unforeseeable results. By using the Software provided by FastBrokers, End User assumes full responsibility for verifying the validity of the Software, and End User accepts full responsibilities for its actions, trades, profit or loss, and End User agrees to hold FastBrokers harmless in any and all ways. If you do not agree with this statement you must remove the Software from your computer.
All trademarks are the property of the respective owners of each piece of Software, where stated.

 

.com #

# support: support@fastbrokers.com #

#————————————————#

CopyRight_Token_End

Buy_Token

CROSSOVER(SMA(CLOSE, 14), SMA(CLOSE, 34))

Buy_Token_End

Sell_Token

CROSSOVER(SMA(CLOSE, 34), SMA(CLOSE, 14))

Sell_Token_End

Buy_To_Cover_Token

SET PIPVAL = 0.0001

SET TARGETPIPS = 1

SET BUY_NOW = CROSSOVER(SMA(CLOSE, 14), SMA(CLOSE, 34))

SET ELAPSED_BARS = LASTIF(BUY_NOW)

SET BUY_PRICE = REF(CLOSE,ELAPSED_BARS)

CLOSEBUY_PRICE > (PIPVAL * TARGETPIPS)

Buy_To_Cover_Token_End

Sell_To_Cover_Token

SET PIPVAL = 0.0001

SET TARGETPIPS = 1

SET SELL_NOW = CROSSOVER(SMA(CLOSE, 34), SMA(CLOSE, 14))

SET ELAPSED_BARS = LASTIF(SELL_NOW)

SET SELL_PRICE = REF(CLOSE,ELAPSED_BARS)

SELL_PRICECLOSE > (PIPVAL * TARGETPIPS)

Sell_To_Cover_Token_End

 

autotrade
Posted In: Trade, Design, Automate.
Posted By: Salvatore Rossitto
Filed under: Automated Trading
Tags: , , ,
Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Google Bookmarks
  • Live
  • StumbleUpon
  • Technorati
  • Twitter
  • LinkedIn

No Comments

No comments yet.

Sorry, the comment form is closed at this time.

 
support