Forum

how to draw trendline on rsi window?

hi i'm trying to draw a trendline on rsi indicator window but i couldnt i tried subwindow and subID and ind values in objectCreate function in subwindow param. can someone help me? void drawTrendLine( string symbol, ENUM_TIMEFRAMES timeframe, ushort hp1, ushort hp2){ long winHandle = 0 ; long

how can i free object memory after returning it in a function?

this code is returning an object to main function but there is memory leak and it gets enormous when its in a loop void OnStart (){ trendObject *trend = new trendObject(); trend = findTrend( "EURUSD" , PERIOD_D1 , 13 ); delete trend; } trendObject *findTrend( string symbol, ENUM_TIMEFRAMES