Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ======================= example usage in indicator (removed due to TS-style dictionary sloweness)==========================
- using elsystem.collections;
- vars: Dictionary MyObj(null);
- once MyObj = dictionary.create();
- MyObj.Items["up_down"] =false;
- MyObj.Items["price"] =low;
- MyObj.Items["prefix"]="arrrrrrr"+"_above";
- MyObj.Items["barnumber"]=currentbar;
- MyObj.Items["color"]= red;
- MyObj.Items["size"] =18;
- MyObj.Items["type"]=2;
- MyObj.Items["arrowDistanced"]=1; //distance ticks from bar
- MyObj.Items["text"]=text;
- value1= tt_drawarrowfull(MyObj);
- ====================== used this code in function to parse =============================
- _string=MyObj.Items["up_down"] astype string;
- up_down_used = _string = "up" or _string = "above" or _string = "down" or _string = "below";
- up_down_face = _string = "up" or _string = "above";
- CreateArrow(true,
- up_down_used,
- iff( MyObj.Contains("barnumber"), MyObj.Items["barnumber"] astype int, CurrentBar astype int ) astype int,
- MyObj.Items["up_down"] astype string,
- iffstring( MyObj.Contains("prefix"), MyObj.Items["prefix"] astype string, "arrow_" ),
- iff( MyObj.Contains("price"), MyObj.Items["price"] astype double, high) + iff(not (MyObj.Contains("arrowDistanced")), 0, (MyObj.Items["arrowDistanced"] astype int) * tt_ticksize * iff(not up_down_used,0, iff(up_down_face, +1, -1)) astype double) ,
- Color.FromArgb( iff( MyObj.Contains("color"), MyObj.Items["color"] astype int, yellow) ),
- iff( MyObj.Contains("size"), (MyObj.Items["size"] astype int)*1.00, 12.0 ) astype double,
- iff( MyObj.Contains("type"), (MyObj.Items["type"] astype int)*1.00, 1.0 ) astype double,
- iffstring( MyObj.Contains("text"), MyObj.Items["text"] astype string, "")
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement