Jump to content

SmartBook.SRC Decompile


leonex3

Recommended Posts

  • 2 months later...

hello the problems are these few lines of code but I'm not a programmer are only a self-taught and nono know translate them.but if you put the CS in indicator and try to compile CTRl-F5 you will see errors (the original code is the one indented) I would love to have the CS to make small changes, I hope you succeed. Thanks in advance and I hope that Google has translated well.

 

Lines 286 - 298 - 304 - 459

 

protected override void OnMarketDepth(MarketDepthEventArgs e)

{

try

{

SortedDictionary<double, int> dictionary;

// if (e.get_MarketDataType() == null)

if (e.MarketDataType == MarketDataType.Ask)

{

dictionary = this._AskAllLimitOrderLevels;

}

else

{

// if (e.get_MarketDataType() != 1)

if (e.MarketDataType != MarketDataType.Bid)

{

return;

}

dictionary = this._BidAllLimitOrderLevels;

}

// if ((e.get_Operation() == null) || (e.get_Operation() == 1))

if ((e.Operation == null) || (e.Operation == 1))

{

// if (dictionary.ContainsKey(e.get_Price()))

if (dictionary.ContainsKey(e.Price))

{

// dictionary.Remove(e.get_Price());

dictionary.Remove(e.Price);

}

// dictionary.Add(e.get_Price(), (int) e.get_Volume());

dictionary.Add(e.Price, (int) e.Volume);

}

// if (((e.get_Operation() == 2) && (e.get_MarketDataType() == null)) && (e.get_Price() < base.GetCurrentAsk()))

if (((e.Operation == 2) && (e.MarketDataType == null)) && (e.Price < base.GetCurrentAsk))

{

// dictionary.Remove(e.get_Price());

dictionary.Remove(e.Price);

}

// if (((e.get_Operation() == 2) && (e.get_MarketDataType() == 1)) && (e.get_Price() > base.GetCurrentBid()))

if (((e.Operation == 2) && (e.MarketDataType == 1)) && (e.Price > base.GetCurrentBid))

{

// dictionary.Remove(e.get_Price());

dictionary.Remove(e.Price);

}

if (this.lastRefresh.AddMilliseconds((double) this.levelIIRefreshDelayMillis) < DateTime.Now)

{

// base.get_ChartControl().Refresh();

base.ChartControl.Refresh();

this.lastRefresh = DateTime.Now;

}

}

catch (Exception exception)

{

base.Print("SmartBook OnMarketDepth(...) - " + exception.Message);

}

}

Edited by leonex3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...