Click here to Login





                                                   Customize Trailing StopLoss & Volume Summation

  2

0
ymlee
2014-11-14 08:32:10


Hi QS,

How could I sum-up total volume of today close > yesterday close for the pass 100 bars?

How could I setup a trailing stoploss based on certain candlestick formation?



QuantShare
2014-11-14 10:18:50

  0

- How could I sum-up total volume of today close > yesterday close for the pass 100 bars?

a = sumif(close > close[1], volume, 100);


- How could I setup a trailing stoploss based on certain candlestick formation?

p = 10; //10% trailing stop
p = iff(your condition, 10, 100); // Trailing stop disabled 100% when your condition is true
SetSimStop(_StopTrailing, _Percent, p, 0);



ymlee
2014-11-14 12:30:31

  0

Thanks for your helps.

Question#1 is settled.

Question#2:
I want to set the exact price for stoploss, not by percentage.
Let say my Buy signal is based on 3 bar with the same Low price for 3 days (let say $8) and Buy at tomorrow open (let say $9),
after my Entry I want to set stoploss at $8, nor matter how far the price go, as long as Close price not lower than $8, I will hold it.
Until I see another 3 bar with the same Low price again (let say at $12), I will set my StopLoss to $12.









QuantShare
2014-11-15 03:16:55

  0

You can use _Point instead of _Percent. However the stop level will be calculated by subtracting the entry price by the point value you specify.
To create dynamic stops like in the example you provided, you need to implement that in C# using the money management scripting tool.



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
McClellan Oscillator and Summation Index
FII & DII - Foreign and Domestic Institutional Investors
Monthly individual stocks put and call volume
Decreasing the Trailing Stop Level every Trading Bar
Stocks with the highest Volume Increase

How-to Lessons
How to create trading rules based on Put and Call volume data
How to change volume bar colors when the price closes down
How to create volume bar charts
How to filter stocks in a market composite
How to optimize the number of positions in a trading system

Related Forum Threads
Intraday data with volume
how to creat support & resistance level for n days?
Profit loss protection trailing stop line on chart .
Trailing stop value with Intraday data
Logic for GapUp() & GapDown() functions

Blog Posts
Different Types of Trading Indicators: Trend, Momentum, Volatilit...
Composite Indicators
6 techniques to improve the performance of your stock trading str...
Let me Show You How to Create Hundreds of Profitable Trading Syst...
Troubleshooting a Trading System









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.