Topics
Replies
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
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
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"
@dleeeq8