Click here to Login





                                                   Active position

  1

0
Amritendu Maji
2017-07-24 09:51:38


How can I figure out if I have an active position using?

I want to determine the highest high since last entry and lowest low since last long position.

How do I do that?




Amritendu Maji
2017-07-24 11:31:36

  0

Also, does the "buy" or "sell" rules return a value of 1 when successful?

For example,
buy = Close > Open;

a = if(buy == 1, 1000, -1000);
print(a);

Is this possible?

Thank you,
Maji



Amritendu Maji
2017-07-25 00:29:07

  0

Another question...

BarSinceSell = Barssince(Sell);
LowestClose = LLvLB(close,Barssince(BarSinceSell));

Why is it not working?

Thank you,
Maji



QuantShare
2017-07-25 12:14:19

  0

1/ does the "buy" or "sell" rules return a value of 1 when successful?
Yes. You can just plot any variable on a chart to see what it returns.
Print function will display the data in "View -> Output"

2/ In the second line you are calculating "Barssince(BarSinceSell)". I am not sure why you are doing this. Please check the variable on a chart to understand and debug your formula.

Also, note that QS formula is run to get signals only and at that time the backtester does not know yet which stocks will be bought/sold. It order to use the entry price and stuff like that you need to use the money management tool.



Amritendu Maji
2017-07-25 12:45:06

  0

for No. 2, I tried

LowestClose = LLvLB(close,Barssince(Sell));

It had a line drawn under "Sell". What is wrong with this syntax?

I think I need some guidance to show me:
1. How to check variables on a chart.
2. An example on how to use the basic QS based trading system and the MM tool together for a system.

Thank you.



Amritendu Maji
2017-07-25 18:47:57

  0

Got my answer to how to check variables on a chart from here -
https://www.quantshare.com/sa-582-the-ultimate-guide-to-create-trading-systems-in-quantshare

Need the other answers.

Thank you.



QuantShare
2017-07-26 10:56:54

  0

Best Answer
"llvlb" returns the number of bars since the array reached its lowest value.
If you want to get the lowest close price then use:
a = LLvLB(close,Barssince(Sell));
LowestClose = ref(close, a);

Regarding MM scripts, you can find many blog posts about that.
Example:
https://www.quantshare.com/sa-339-basic-trading-system-implemented-using-the-money-management-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
Stock Industry Position
Position Sizing: Fixed Percentage of Current Equity
Exit Position based on Profitability
Fixed Fractional Position Sizing
Capital Allocation based on Moving Average position on Instrument

How-to Lessons
How to download EOD quotes for active and valid stocks only
How to create a trading system
How to print a chart
How to display notes/commentaries on a chart
How to use a custom drawing tool

Related Forum Threads
Dynamic Position
Dynamic Position Sizing
Simulation/Back testing - Default position sizing method
Set Position Size by Ticker Within Main Strategy
How do I reduce a position size from within the Money Management

Blog Posts
Dynamic Position Sizing in your Trading System
Update Chart Layout based on Active Time Frame
Update Chart Layout based on Active Ticker Symbol - Part 2
5 position sizing techniques you can use in your trading system
Update Chart Layout based on Active Ticker Symbol









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.