marko001 Posted May 14, 2018 Share Posted May 14, 2018 Hi all guys, I have three graphs in my GUI, each of them defined with GDIPLUS, here an example of just one of them: Func _drawVOLUME($x = 0, $y_startVOL = 0) If $GraphVolumesCreated = 0 Then $aGraphV = _GraphGDIPlus_Create($MainGUI, 830, 361, 1076, 114, 0xFF000000, 0xFF1B1B1B) _GraphGDIPlus_Set_RangeX($aGraphV, 0, $x, $x / 5, 1, 0) _GraphGDIPlus_Set_RangeY($aGraphV, _ArrayMin($aMACD, 1, UBound($aMACD) - $x, UBound($aMACD) - 1, 11), _ArrayMax($aMACD, 1, UBound($aMACD) - $x, UBound($aMACD) - 1, 11), 3, 1, 1) $GraphVolumesCreated = 1 Else _GraphGDIPlus_Clear($aGraphV) _GraphGDIPlus_Set_RangeY($aGraphV, _ArrayMin($aMACD, 1, UBound($aMACD) - $x, UBound($aMACD) - 1, 11), _ArrayMax($aMACD, 1, UBound($aMACD) - $x, UBound($aMACD) - 1, 11), 3, 1, 1) EndIf _GraphGDIPlus_Set_PenColor($aGraphV, 0xFF78F900) ; LIGHT GREEN - VOLUMES _GraphGDIPlus_Set_PenSize($aGraphV, 5) ;~ _GraphGDIPlus_Plot_Start($aGraph, 0, $y_startVOL) For $i = 0 To $x - 1 _GraphGDIPlus_Plot_Start($aGraphV, $i, 0) ; _GraphGDIPlus_Plot_Line($aGraphV, $i, $aMACD[UBound($aMACD) - 1 - $x + 1 + $i][11]) Next _GraphGDIPlus_Refresh($aGraphV) EndFunc ;==>_drawVOLUME as recommeded from UDF I use WinSetTrans($MainGUI, "", 255) But more or less randomly it happens that X and Y values on axis don't show (pic uploaded). IS there a way to solve this? Thanks, Marco SS_871.bmp Link to comment Share on other sites More sharing options...
marko001 Posted May 15, 2018 Author Share Posted May 15, 2018 @UEZ Sorry to disturb you, I saw you had answers for similar matters in other threads, maybe you can help me to sort it out. Thanks, marco Link to comment Share on other sites More sharing options...
UEZ Posted May 15, 2018 Share Posted May 15, 2018 Well @marko001. With this snippet above I cannot tell you what might be wrong. Just create a working example and I will have a look. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
marko001 Posted May 15, 2018 Author Share Posted May 15, 2018 The one you see above is the original code, there's nothing particular in the cycle, just 2 adlibregister functions (to call OHLC datas (5mins) and MACD values (10 secs)). 3 graphs to build a) MACD curves, b ) volumes, c) stock value. $amacd[$i][12] is the array that contains all stocks data: ;~ 0 - Date ;~ 1 - Open ;~ 2 - High ;~ 3 - Low ;~ 4 - Close ;~ 5 - $short Days EMA ;~ 6 - $long Days EMA ;~ 7 - MACD (YELLOW LINE) ;~ 8 - Signal (RED LINE) ;~ 9 - Histogram ;~ 10 - not used ;~ 11 - Volumes Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now