Topics
27 Jun 2018, 21:31
 0
 1822
 4
28 Aug 2017, 18:39
 1630
 2
18 Aug 2017, 13:17
 3674
 8
Replies

dleeeq8
22 Jun 2018, 20:53

What you ask for is not clear.

 

but if you want martingale to check if last trade was lose then use "History"

 

 

var p= History.FindLast("Label",Symbol);
var isLose = (p != null && p.Pips<0);

if(isLose)
{
// do something
}

 


@dleeeq8

dleeeq8
29 May 2018, 19:24

for me the 3.0 is more light than 2.x

and used less ram than before


@dleeeq8

dleeeq8
29 May 2018, 18:55

im calgo coder and i liked the new version two in one. also i liked the new API need to test them more later

problems i see in calgo is if you have too much cbot/indicator projects this will slow down and take more RAM

because every project have its own/chart window

you can make it more light with single chart window and when someone switch project load the new chart?

thanks for the update and keep it up.

 

 

 

 


@dleeeq8

dleeeq8
28 Aug 2017, 18:47

oh sorry the bug is in my eyes .. i didnt sort it correctly by closing time ..

you can please close this topic ..


@dleeeq8

dleeeq8
09 Aug 2017, 08:38

 var DailyOpen = Daily.OpenTime.GetIndexByTime(MarketSeries.OpenTime[0]);

this line used index 0 for OpenTime

index 0 means first bar in history of your TimeFrame

 

you need to use last index or before last  -> here i use last one not current open one

var DailyOpen = Daily.OpenTime.GetIndexByTime(MarketSeries.OpenTime.Last(1));

 for current open bar use 0: 

MarketSeries.OpenTime.Last(0);

if you want  to see is last bar a Green or Red bar 

Close - Open = +1 or -1

var dframe=MarketData.GetSeries(TimeFrame.Daily);
if(dframe.Close.Last(1)-dframe.Open.Last(1) > 0)
{
 // last Daily Bar is Green
}else{
 // last Daily Bar is Red
}

do your tests

 

gl


@dleeeq8

dleeeq8
03 Aug 2017, 00:37

i see there is no option for closingPrice .. but here is a way give you the close or "near" close price

Change = pips * Symbol.PipSize , so the 5pips will be 0.0005 based on symbol

if trade is sell:  reverse the Change like this: Change = ( Change - ( Change * 2 ) ) 

EntryPrice + Change = ClosePrice

Code For Test:

var entryPrice = position.EntryPrice;
var change = (position.TradeType == TradeType.Buy ? position.Pips : position.Pips - (position.Pips * 2)) * Symbol.PipSize;
var closePrice = entryPrice + change;
Print(entryPrice.ToString("0.0000") + " " + change.ToString("0.0000") + " " + closePrice.ToString("0.0000"));
     

 

GL ..


@dleeeq8