Why returned value is always 1.797693134862316e+308
Why returned value is always 1.797693134862316e+308
Loading saved threads...
relo80 · External communityPost link
External question — Stack Overflow Stack Exchange
Author: relo80
Original post: https://stackoverflow.com/questions/70128715
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
i try to include a indicator in my ea, but i still get as results always "1.797693134862316e+308" if i print out the copied datas from the icustom-function.
int iCustomHandle;
double trendline_buy_signal[];
double trendline_sell_signal[];
double trendline_sl_price[];
double trendline_tp1_price[];
double trendline_tp2_price[];
double trendline_tp3_price[];
int OnInit()
{
iCustomHandle = iCustom(symbol, time, "\\Indicators\\Market\\myindicator.ex5");
if(iCustomHandle == INVALID_HANDLE){ return(INIT_FAILED); }
return (INIT_SUCCEEDED);
}
void OnTick()
{
int valueDistance = 0;
int calculatedInd = BarsCalculated(iCustomHandle);
ArraySetAsSeries(trendline_buy_signal, true);
ArraySetAsSeries(trendline_sell_signal, true);
ArraySetAsSeries(trendline_sl_price, true);
ArraySetAsSeries(trendline_tp1_price, true);
ArraySetAsSeries(trendline_tp2_price, true);
ArraySetAsSeries(trendline_tp3_price, true);
int copied;
copied = CopyBuffer(iCustomHandle, 2, 0, calculatedInd, trendline_buy_signal);
copied = CopyBuffer(iCustomHandle, 8, 0, calculatedInd, trendline_sell_signal);
copied = CopyBuffer(iCustomHandle, 9, 0, calculatedInd, trendline_sl_price);
copied = CopyBuffer(iCustomHandle, 10, 0, calculatedInd, trendline_tp1_price);
copied = CopyBuffer(iCustomHandle, 11, 0, calculatedInd, trendline_tp2_price);
copied = CopyBuffer(iCustomHandle, 12, 0, calculatedInd, trendline_tp3_price);
Print("calculatedInd:",calculatedInd," > iCustom bufferr: buy_signal:", trendline_buy_signal[valueDistance],
" > sell_signal:",trendline_sell_signal[valueDistance],
" > sl_price:",trendline_sl_price[valueDistance],
" > tp1:",trendline_tp1_price[valueDistance],
" > tp2:",trendline_tp2_price[valueDistance],
" > tp3:",trendline_tp3_price[valueDistance]);
}
What is the reason for it and how i can solve it?
Thanks a lot!
Quote
Report
jaouad amdah · External communityPost link
External answer — Stack Overflow Stack Exchange
Author: jaouad amdah
Original post: https://stackoverflow.com/a/74735275
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
you get EMPTY_VALUE so You should use something like this:
if(Value != EMPTY_VALUE)
Print(Value);
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Stack Overflow Stack Exchange Author: jaouad amdah Source score (net votes, not local likes): 0 Original post: https://stackoverflow.com/a/74735275 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. you get EMPTY_VALUE so You should use something like this: if(Value != EMPTY_VALUE) Print(Value);
Checking account access…