Entry Price in Base Deposit Currency

Created at 09 Jan 2015, 03:02
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
deklin's avatar

deklin

Joined 31.12.2014

Entry Price in Base Deposit Currency
09 Jan 2015, 03:02


 

The EntryPrice is different for different pairs.  

For example, the EntryPrice for the pair "USDCAD" is quoted in USD
The EntryPrice for the pair "EURUSD" is quoted in EUR.
The EntryPrice for the pair "
GBPJPY" is quoted in GBP.

In the code below, the value of EntryPrice is not consistence between pairs,  How can I get this in the value of the base deposit currency, so that the EntryPrice is consistently represented?

using System;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
using System.IO;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]

    public class EntryPrice : Robot
    {
        protected override void OnStart()
        {
            foreach (var position in Positions)
            {
                Print(position.SymbolCode + "  Entry Price: " + position.EntryPrice);
            }
        }

        protected override void OnTick()
        {
        }

        protected override void OnStop()
        {
        }

    }
}

 


@deklin