Description
//facebook fanpage: www.facebook.com/Ai.Algo using cAlgo.API; namespace cAlgo { [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class ShowEquity : Indicator { public string note1 { get; set; } [Parameter("Note 2")] public string note2 { get; set; } string Tradeposition; public override void Calculate(int index) { var positin = Positions.FindAll(""); double ripatamiter = 0; double order = 0; if (Symbol.Code == "USDJPY" || Symbol.Code == "EURJPY" || Symbol.Code == "GBPJPY" || Symbol.Code == "AUDJPY" || Symbol.Code == "CHFJPY" || Symbol.Code == "CADJPY" || Symbol.Code == "NZDJPY" || Symbol.Code == "SGDJPY" || Symbol.Code == "NOKJPY" || Symbol.Code == "SEKJPY" || Symbol.Code == "ZARJPY") { ripatamiter = Symbol.Bid * 10; } else if (Symbol.Code == "XAUUSD" || Symbol.Code == "XAUEUR" || Symbol.Code == "XTIUSD" || Symbol.Code == "XAGUSD" || Symbol.Code == "XAGEUR" || Symbol.Code == "XPTUSD" || Symbol.Code == "XNGUSD" || Symbol.Code == "XBRUSD" || Symbol.Code == "USDX") { ripatamiter = Symbol.Bid; } else { ripatamiter = Symbol.Bid * 1000; } string show = ""; foreach (var postition in positin) { double data; if (postition.SymbolCode == "USDJPY" || postition.SymbolCode == "EURJPY" || postition.SymbolCode == "GBPJPY" || postition.SymbolCode == "AUDJPY" || postition.SymbolCode == "CHFJPY" || postition.SymbolCode == "CADJPY" || postition.SymbolCode == "NZDJPY" || postition.SymbolCode == "SGDJPY" || postition.SymbolCode == "NOKJPY" || postition.SymbolCode == "SEKJPY" || postition.SymbolCode == "ZARJPY") { data = (postition.Volume * postition.EntryPrice) / 100; order = order + data; } else { data = postition.Volume * postition.EntryPrice; order = order + data; } if (postition.TradeType == TradeType.Buy) { Tradeposition = "B "; } else if (postition.TradeType == TradeType.Sell) { Tradeposition = "S "; } string riskparamitor = data.ToString("N0"); string input = postition.SymbolCode + " " + riskparamitor + " " + postition.Pips + "pips" + " " + postition.NetProfit + " " + postition.Comment; show = show + Tradeposition + input + "\n"; } if (!IsLastBar) { return; } else { ChartObjects.DrawText("Order", show, StaticPosition.BottomLeft, Colors.Blue); } } } }
facebook fanpage: www.facebook.com/Ai.Algo
using cAlgo.API;
namespace cAlgo
{
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class ShowEquity : Indicator
{
public string note1 { get; set; }
[Parameter("Note 2")]
public string note2 { get; set; }
string Tradeposition;
public override void Calculate(int index)
{
var positin = Positions.FindAll("");
double ripatamiter = 0;
double order = 0;
if (Symbol.Code == "USDJPY" || Symbol.Code == "EURJPY" || Symbol.Code == "GBPJPY" || Symbol.Code == "AUDJPY" || Symbol.Code == "CHFJPY" || Symbol.Code == "CADJPY" || Symbol.Code == "NZDJPY" || Symbol.Code == "SGDJPY" || Symbol.Code == "NOKJPY" || Symbol.Code == "SEKJPY" || Symbol.Code == "ZARJPY")
{
ripatamiter = Symbol.Bid * 10;
}
else if (Symbol.Code == "XAUUSD" || Symbol.Code == "XAUEUR" || Symbol.Code == "XTIUSD" || Symbol.Code == "XAGUSD" || Symbol.Code == "XAGEUR" || Symbol.Code == "XPTUSD" || Symbol.Code == "XNGUSD" || Symbol.Code == "XBRUSD" || Symbol.Code == "USDX")
{
ripatamiter = Symbol.Bid;
}
else
{
ripatamiter = Symbol.Bid * 1000;
}
string show = "";
foreach (var postition in positin)
{
double data;
if (postition.SymbolCode == "USDJPY" || postition.SymbolCode == "EURJPY" || postition.SymbolCode == "GBPJPY" || postition.SymbolCode == "AUDJPY" || postition.SymbolCode == "CHFJPY" || postition.SymbolCode == "CADJPY" || postition.SymbolCode == "NZDJPY" || postition.SymbolCode == "SGDJPY" || postition.SymbolCode == "NOKJPY" || postition.SymbolCode == "SEKJPY" || postition.SymbolCode == "ZARJPY")
{
data = (postition.Volume * postition.EntryPrice) / 100;
order = order + data;
}
else
{
data = postition.Volume * postition.EntryPrice;
order = order + data;
}
if (postition.TradeType == TradeType.Buy)
{
Tradeposition = "B ";
}
else if (postition.TradeType == TradeType.Sell)
{
Tradeposition = "S ";
}
string riskparamitor = data.ToString("N0");
string input = postition.SymbolCode + " " + riskparamitor + " " + postition.Pips + "pips" + " " + postition.NetProfit + " " + postition.Comment;
show = show + Tradeposition + input + "\n";
}
if (!IsLastBar)
{
return;
}
else
{
ChartObjects.DrawText("Order", show, StaticPosition.BottomLeft, Colors.Blue);
}
}
}
}
TA
tang_to_444@hotmail.com
Joined on 26.04.2016
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: L1.5.algo
- Rating: 0
- Installs: 2216
- Modified: 13/10/2021 09:54
Note that publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section, please use the Copyright Infringement Notification form to submit a claim.
Comments
Log in to add a comment.
No comments found.