Search Engine
Here you can search through the pages of this Namespace, their attachments and the files uploaded to the system.
Note: the results will only display the items you have permissions to read.
This search, performed through 4.04 MB (775 documents, 11955 words), completed in 0.0 seconds and yielded 11 results.
[...] Target (L)" , 1.08, 1.01, 1.30, 0.01);
paramSLLong = CreateParameter( "Stop Loss (L)" , 0.96, 0.85, 0.99, 0.01);
paramPTShort = CreateParameter( "Profit Target (S)" , 0.92, 0.70, 0.99, [...]
[...] reward of 4) The following call accomplishes this: Position s = SplitPosition ( LastPosition , 49.99 ); SplitPosition returns a new Position object that contains the remaining shares. This new Position object is also added to the end of the Positions list.
Conclusion
This is a simple example of using SplitPosition. Managing multiple positions, especially when splitting them, can be tricky. But WealthScript provides to tools necessary to implement strategies that take partial profits, or split positions into multiple parts for any other reason.
Code
using [...]
[...] RevenueEstimate, and RevenueSurprise . They are available in two forms: In a popup when mousing over an [99] eps item on a stock chart In WealthScript Strategoes via the GetDetail or FormatValue methods:
Make sure you've collected the fundamental data before running this Strategy (Data Manager > "Update Data" tab > check "99WallStreet.com earnings releases" > go to "DataSets" tab > click "Update DataSet").
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using WealthLab.Indicators; namespace WealthLab.Strategies
{
[...]
[...] protected override void Execute()
{
int period = paramPeriod.ValueInt;
double Goal = 9.99; //Calcluate modified true range (MTR) [...]
[...]
if ( maxAmpl ! = 0 && ah[n].A / maxAmpl > 0 )
ah[n].dB = 10 * Math.Log10( (1 - 0.99 * ah[n].A / maxAmpl) / 0.01 );
ah[n].dB [...]
[...] )
{
if ( maxAmpl ! = 0 && ah[n].A / maxAmpl > 0 )
ah[n].dB = 10 * Math.Log10( (1 - 0.99 * ah[n].A / maxAmpl) / 0.01 );
ah[n].dB [...]
[...] adjacent two red bins, -0.5 and 0, have comprised losing trades which risk/reward was ranging from -0.99:1 to -0.5:1 and from -0.49:1 to 0, respectively. [...]
[...]
Description
Exports data to ASCII comma-separated files. Sample data string: 07/31/2009,162.99,165,162.91,163.39,15090600
Example
Example [...]
[...] public class MyStrategy : WealthScript
{
protected override void Execute()
{
int Period = 99;
CMO cmo = CMO.Series( Close ,20);
RSI [...]
[...] slippage as a percentage of size (e.g. 100% sizing - 0.05% slippage - 0.05% commission, so final size = 99.9%). Related option For last position, use [...]
[...] Example: */ Position p = LastPosition ; // Position to split Position sp = SplitPosition (p, 49.99); // The new Position sp.Priority = p.Priority; [...]