Forum

hey am new to coding and i was trying to create a simple renko chart indicator am kind stuck here can anyone give me ideas?

#property indicator_chart_window extern int BrickSize = 10 ; // Brick size in pips int OnCalculate ( const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const

help with my code i want it to run once per bar/candle but keeps placing multiple trades at the same time and i dont have a clue why? can anyone help me out

// Input settings input double LotSize = 0.01; input double StopLoss = 0; input double TakeProfit = 0; void OnTick() { // Get the open and close prices of the previous bar double open1 = iOpen(NULL, PERIOD_CURRENT, 1); double close0 = iClose(NULL, PERIOD_CURRENT, 0); // Get the close price