Click here to Login





                                                   Trend Regime as a function

  0

0
JC
2021-04-08 17:14:39


Hi, I'm looking for a function that is very similar to the "ExRem" in amibroker
the exrem works as follows:
ExRem (array1,array2);

the array, and could be your entry criteria, b another array or could be your exit criteria
its usefulness is that it remains as 1, when your first array is met, and then 0 when your second array is met
This is particularly useful in setting a trend regime

My "trend" is when the upper donchian is broken, and then remains as an uptrend until the lower donchian is broken
im struggling to make this a condition, such that this is my trend and i can assign an array to this
My buy signal is completely separate, but is conditional on my trend being true

hope this makes sense

if this were amibroker code
a = close>HHV(10);
b = close<LLV(10);
bullish = exrem(a,b); and would be 1 where a is met, and zero when b becomes met

my buy signal then could be
buy = cross(smaX,smaY) AND Bullish allowing me to have a buy signal but on condition of my overall trend being met



QuantShare
2021-04-23 14:10:04

  0

Best Answer
Try using the "RemoveSameSignals" function.


JC
2021-04-24 17:06:46

  0

Perfect, exactly what i was looking for. thank you!!


No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Volume Accumulation Trend Line
Volume Trend Index - Market Indicator
Trend Deviation Indicator
LSS Pivotal Buy and Sell Numbers - Trend Reaction
Directional Trend Index Strategy

How-to Lessons
How to create a trading system
How to plot two different time frames in the same chart
How to plot arrows below/above candlesticks on a chart
How to set order type of a trading system programmatically
How to display the bar index of a stock on a chart

Related Forum Threads
Percent Rank Function Needed
Interpretation of " DRAWDOWNEQ" function
TimeframeApply function
newbie looking for function help
Logging the Comp() function

Blog Posts
Trend Following and Moving Averages
Trend following systems
How to Pick the Best Trend Indicators
How to create market indicators using the composite function - Pa...
How to create market indicators using the composite function - Pa...









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.