Hi,
How do I detect a new bar opening (in C++11) in your product please?
Thanks in advance,
New Bar
- neHcioHep
- Posts: 18
- Joined: Sat Nov 21, 2009 5:49 pm
- Contact:
Re: New Bar
Please try something like this
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);
}
Return to “Programming lessons”
Who is online
Users browsing this forum: No registered users and 16 guests