Click here to Login





                                                   EntryPrice

  0

0
allan nathan
2012-10-02 13:17:46


Hi,
I am using the MM staggered entry and exit rules and can not figure out how to code an exit

'entryprice' + 2 ATR

is there a field called entryprice??

Thanks,

Allan



QuantShare
2012-10-02 17:20:53

  0

You can access entry price only using the money management script.
You can set an exit at "entryprice" + 2ATR, by adding a stop loss (Point) with "2 * atr(1)" as level.



allan nathan
2012-10-02 19:39:27

  0

Well that was easy enough!!!
Am i correct that one can only write a money management script if they know Csharp or other languages???
You cant write a script with QS language?

Thanks,

Allan



QuantShare
2012-10-02 19:54:21

  0

A money management script can be implemented only using C# or JScript.Net.


allan nathan
2012-10-02 22:33:24

  0

if I want to optimise a variable in a money management,do i need to implement C# or jscript??

Can one use QS language for Optimize.Optimizedouble in the Onstartsimulation ?

Allan




QuantShare
2012-10-03 10:54:35

  0

"Optimize.Optimizedouble" is a C# function.

Example to vary "a" from 1 to 10:
Optimize.OptimizeDouble("a", 1, 10, 1);

The Staggered Entry and Exit Strategy item allows you to enter a QS language rule in the MM variables because, internaly, the MM script takes this entered value (in Text format) and use it with the function: Data.ParseFormula("");

The above function allows you to parse a QS language formula within a C# script.






Staggered Entry and Exit Strategy (by QuantShare, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads Notes Report an item

allan nathan
2012-10-03 12:45:33

  0

For MM scripts in C#,does the Optimisation,i.e 'Optimize.OptimizeDouble("a",1,10,1)
take place in theStrategy formula editor or at the Advanced Money Management OnStartSimulation event??

I am using the Staggered entry script with no problems,and I see one can optimise the variables at the strategy level in the formula editor.However,when i go to MM and click on Update to view the formula,I do not see Optimize.OptimizeDouble in the code at OnStartSimulation event..

Where does one enter that code/

Thanks for the help,

Allan



QuantShare
2012-10-03 20:08:08

  0

It should be placed in the MM OnStartSimulation event.

What exactly do you want to optimize?

If you want to optimize the formula entered in the MM input of the Staggered entry script then you cannot do that. This MM script doesn't allow you to do that.




allan nathan
2012-10-04 00:04:50

  0

Hi,
I am looking to optimize various money management variables such as "Risk"," and # of positions" (as in the following examples).
I dont have the ability to code in C# and find myself very reliant on other to code MM scripts that may work for me. I really like QS,but the documentation is not at the same level as the program and it can make things very challenging for the non programmers.




Buy = <your buy formula here>
Sell = 0; // selling only by stop

TrailStopAmount = 2 * ATR( 20 );
Capital = 100000;
Risk = 0.01*Capital;
PositionSize = (Risk/TrailStopAmount)*BuyPrice;
ApplyStop( 2, 2, TrailStopAmount, 1 );
--------------------------------------------------------------------

posqty = Optimize("PosQty", 4, 1, 20, 1 );
SetOption("MaxOpenPositions", posqty);

// desired position size is 100% portfolio equity
// divided by PosQty positions

PositionSize = -100/posqty;



allan nathan
2012-10-04 02:34:12

  0

I just want to be clear ..QuantShare is an awesome product.It has so many excellent features that it can be a bit overwhelming for the non programmer.I should have said the documentation does not do the program justice.


Thank you,

allan



QuantShare
2012-10-04 11:01:54

  0

Best Answer
Please use this MM script: Fixed Risk per Trade - Position Sizing.

We will create more blog posts about the Money Management script.





Fixed Risk per Trade - Position Sizing (by Juliettpapa, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads Notes Report an item

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
AGNC Trading System
U.S. Dollar Long-Short Position Ratios
VMACD Indicator (Volume Moving Average Convergence Divergence)
Percentile Rank of PEG, Price/Free Cash Flow and Price/Sales
Inertia Indicator

How-to Lessons
How to draw distances on a chart?
How to create a mobile database/account
How to get stocks for a particular index using the global script
How to create and trade a Neural Network model
How to create a custom trading indicator

Related Forum Threads
Reference to entryprice in strategy
Filter out limit orders that doesn't trade through limit price
ATR stop and MM
Renaming Equal Weighted Index
Downloader doesn't download - why?

Blog Posts
Trading Optimization
Create a trading strategy using the money management tool - Part ...
How to create custom databases in your trading software
Historical Market Data
How to simulate options strategies









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.