Dear traders
Let me introduce you to a script which tells you how much a symbol is profitable and growing at a given time frame on the scale of 0 to 100.
higher the outcome higher the profit ratio along with higher the growth of symbol.
if the outcome is negative get the hell out!! from that symbol.
many many thanks to jeanlouie and BlueRain for indicating the way.
Let me introduce you to a script which tells you how much a symbol is profitable and growing at a given time frame on the scale of 0 to 100.
higher the outcome higher the profit ratio along with higher the growth of symbol.
if the outcome is negative get the hell out!! from that symbol.
many many thanks to jeanlouie and BlueRain for indicating the way.
Inserted Code
void OnStart() { double ATR_Data[]; ArraySetAsSeries(ATR_Data,true); CopyBuffer(iATR(_Symbol,PERIOD_CURRENT,27), 0, 0, 100, ATR_Data); double ATR_Pure = (NormalizeDouble(ATR_Data[0],Digits()))/_Point; int SPREAD_Pure = SymbolInfoInteger(Symbol(), SYMBOL_SPREAD); MqlRates PRICE_Information[]; ArraySetAsSeries(PRICE_Information,true); CopyRates(_Symbol,PERIOD_CURRENT,0,Bars(_Symbol,PERIOD_CURRENT),PRICE_Information); double HIGHEST_Data[]; ArraySetAsSeries(HIGHEST_Data,true); CopyHigh(_Symbol,PERIOD_CURRENT,0,27,HIGHEST_Data); double HIGH_Pure = (NormalizeDouble((PRICE_Information[ArrayMaximum(HIGHEST_Data,0,27)].high),Digits()))/_Point; double LOWEST_Data[]; ArraySetAsSeries(LOWEST_Data,true); CopyLow(_Symbol,PERIOD_CURRENT,0,27,LOWEST_Data); double LOW_Pure = (NormalizeDouble((PRICE_Information[ArrayMinimum(LOWEST_Data,0,27)].low),Digits()))/_Point; double PROFIT = NormalizeDouble(((HIGH_Pure-LOW_Pure)/SPREAD_Pure),2); double GROWTH = NormalizeDouble(((ATR_Pure/SPREAD_Pure)-1),2); Print("Profit="+PROFIT+","+"Growth="+GROWTH); }
2