Topics
Replies
Spotware
23 Dec 2013, 09:42
RE:
StormeNet said:
I've adjusted the UltimatePivotPoints indicator to include the middle lines and S3 and R3.
/// /// Get the time span between two consecutive bars OpenTime /// private TimeSpan GetTimeFrame() /// /// Get the name representation of the timeframe used /// ///Time span between two consecutive bars OpenTime /// The name representation of the TimeFrame private string GetTimeFrameName()
Note that you no longer need to use methods such as the above because the API has the Timeframe class.
@Spotware
Spotware
20 Dec 2013, 17:07
There are three buttons that show different views of liquidity. Their purpose is not to expand and collapse the item but to switch between views. In order to expand and collapse you should click on the top of each item where the symbol is displayed. If this is not what you meant please post a screenshot indicating the issue.
@Spotware
Spotware
20 Dec 2013, 10:08
OnPositionOpened / OnPositionClosed will not be raised with the new API methods. Instead you can subscribe events such as in the following example.
The new API allows the use of synchronous as well as asynchronous operation.
ExecuteMarketOrder is using synchronous operation and will not continue to the next statement but will wait until the trade request response from the server is returned. Therefore, you can access position information from the result. You can also subscribe an event to be raised when the position opens.
Please read the Guide and the thread on the New Trading API for more information.
example
protected override void OnStart() { Positions.Opened += PositionsOnOpened; var result = ExecuteMarketOrder(TradeType.Buy, Symbol, 10000, "label"); if(result.IsSuccessful) Print(result.Position.EntryPrice); } private void PositionsOnOpened(PositionOpenedEventArgs args) { var pos = args.Position; // etc... Print("Position opened at {0}", pos.EntryPrice); }
@Spotware
Spotware
20 Dec 2013, 09:44
RE:
cogs said:
I don't think this is an isolated issue, I have the same problem with virtual and RAM nearly all consumed since the update.
We have identified the issue to be related to printing on each tick in backtesting. We will fix this in the new release.
For the time being in order to avoid over consumption of resources, you can check if in backtesting and print only if not.
if (!IsBacktesting) { Print("print something"); }
@Spotware
Spotware
18 Dec 2013, 17:34
There will be an option to hide the output from the settings window of the indicator.
If you like to implement this right now you could omit the Output attribute ( [Output] ) from the IndicatorDataSeries and call CreateDataSeries to initialize it, then in order to reference it, you need to call the Calculate method.
public class OutputNone : Indicator { public IndicatorDataSeries Result { get; set; } protected override void Initialize() { Result = CreateDataSeries(); } //...
To reference the above
OutputNone output; [Output("Main")] public IndicatorDataSeries Result { get; set; } protected override void Initialize() { output = Indicators.GetIndicator<OutputNone>(); } public override void Calculate(int index) { // Calculate value at specified index output.Calculate(index); Result[index] = output.Result[index]; }
@Spotware
Spotware
18 Dec 2013, 09:45
The new API allows the use of synchronous as well as asynchronous operation. Opening positions simultaneously requires asynchronous operation. ExecuteMarketOrder is using synchronous operation and will not continue to the next statement but will wait until the trade request response from the server is returned.
Please read the Guide and the thread on the New Trading API for more information.
@Spotware
Spotware
17 Dec 2013, 16:48
Modify position: /api/reference/robot/modifyposition-6f11
Please see also /api/guides/trading-guide
@Spotware
Spotware
23 Dec 2013, 09:57
We are aware of this necessity and it is in our plans to allow drawing of objects on the backtesting chart in future releases. Thank you for your feedback.
@Spotware