Implementing and Protecting a Trading Strategy with External Indicators in ProBuilder

30 Dec 2015
0 comment
0 attachment

This example demonstrates how to create a trading strategy in ProBuilder that utilizes an externally referenced, protected indicator. The strategy executes a buy order based on the signal from the protected indicator and sets specific profit and loss targets.


// indicator returns 1 when a crossover occurs
// return close crosses over average[200]
//export it so that it cannnot be modified (you can also select to enable/disable multiple copies).
// Then create your strategy:
Signal = CALL "Example"
IF Signal THEN
    BUY 1 Contract AT Market
ENDIF
SET TARGET pPROFIT 100
SET STOP pLOSS 50

//Now you can give anyone your protected indicator (distribute only the .ITF file) + the strategy as a text file to be used as a strategy. The user will never know WHY that signal is generated.

The code snippet above outlines a method to protect the logic of a trading indicator while allowing others to use it within their strategies. Here’s a breakdown of how it works:

  • Indicator Protection: The indicator is designed to generate a signal when a specific condition (e.g., a crossover of the close price over a 200-period average) is met. The indicator is then exported in a way that prevents modification, ensuring that its logic remains hidden.
  • Strategy Creation: The strategy calls the protected indicator named “Example”. If the indicator returns a signal (in this case, a value of 1), the strategy executes a buy order for one contract at the market price.
  • Setting Profit and Loss Targets: The strategy defines a profit target of 100 points and a loss limit of 50 points. These settings help manage the risk and potential reward of the trade.
  • Distribution: The protected indicator is distributed as a .ITF file, which can be used but not altered. The strategy itself can be shared as a text file, allowing others to use the trading strategy without understanding the underlying logic of the signal generation.

This approach is particularly useful for strategy developers who wish to maintain the confidentiality of their proprietary indicators while still providing tools for traders to use in their own trading setups.

Related Post

Check out this related content for more information:

https://www.prorealcode.com/topic/how-to-create-hidden-strategy-for-trading/#post-130213

Visit Link
What is a Snippet? A snippet is a small, reusable chunk of code designed to solve specific tasks quickly. Think of it as a shortcut that helps you achieve your coding goals without reinventing the wheel. How to Use: Simply copy the snippet and paste it into your project where needed. Don't forget to tweak it to fit your context. Snippets are not just time-savers; they're also learning tools to help you become a more efficient coder.
robertogozzi Master
Roberto https://www.ots-onlinetradingsoftware.com
Author’s Profile

Comments

Search Snippets

Showing some results...
Sorry, no result found!

Snippets Categories

global
35
indicator
133
strategy
171

Recent Snippets

How to Create a Simple MTF Trend Dashboard with EMA and SMA
indicator
This indicator builds a compact multi-timeframe (MTF) dashboard that shows whether price is trading above or below a [...]
How to Display Per-Bar Volume Accumulation in Real Time (Intrabar Updates)
global
This snippet tracks and displays the current bar’s accumulated volume while the bar is still forming, instead of only [...]
Ticks Counter: Count Tick Updates Per Bar on Tick or Time Charts
global
This snippet counts how many tick updates have occurred for the current bar by incrementing a per-bar counter on each [...]
How to Build a Step-Based Trailing Stop That Moves to Break-Even First
strategy
This snippet implements a step trailing stop that advances in fixed increments once price reaches predefined profit [...]
Utilizing Arrays to Track and Compare Indicator Values Within the Same Bar in ProBuilder
indicator
This ProBuilder code snippet demonstrates how to use arrays to compare the values of an indicator (RSI in this case) [...]
Logo Logo
Loading...