New Bar
Posted: Sun Feb 19, 2017 10:47 am
Hi,
How do I detect a new bar opening (in C++11) in your product please?
Thanks in advance,
How do I detect a new bar opening (in C++11) in your product please?
Thanks in advance,
Code: Select all
#include <windows.h>
#include "StrategyInterfaceUnit.h"
TDateTime lastKnownBarTime;
//...
EXPORT void __stdcall InitStrategy()
{
//...
}
EXPORT void __stdcall DoneStrategy()
{}
EXPORT void __stdcall ResetStrategy()
{}
EXPORT void __stdcall GetSingleTick()
{
SetCurrencyAndTimeframe(Currency, Timeframe);
if (Time[0] != lastKnownBarTime)
{
// operations for new bar
//...
}
lastKnownBarTime = Time(0);
}