| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #1 | ||
![]() | Floating Point Exception Error Message: Error in study "PSS_S_PR": :{EXCEPTION} Floating Point Exception Error. Any ideas? Input: LeftStrength(10), RightStrength(2), CheckPivotValue(true); Vars: nColor(0), nDir(0), nShift(0), nPrc(0), nBar(0), iIdx(0), txtID(Symbol + "_PRS"), ret1(0), ret2(0); Array: float arrVal1[100](0); DefineDLLFunc: "PSS_PR.DLL", int , "PSS_ZZ_AddBar",INT,LPSTR ,LONG,LONG,INT,int,LPLONG ,LPLONG,LPLONG,LPLONG,INT ; DefineDLLFunc: "PSS_PR.DLL", int , "PSS_ZZ_CalcPiv", INT,LPSTR,LONG,INT,INT,LP FLOAT; nBar = BarNumber; if CheckPivotValue = false then nBar = -BarNumber; ret1 = PSS_ZZ_AddBar(CustomerID, txtID,Date,Time,nBar,Pric eScale,&Open,&High,&Low,& Close,Volume); ret2 = PSS_ZZ_CalcPiv(CustomerID ,txtID,BarNumber,LeftStre ngth,RightStrength,&arrVa l1[0]); if ret2 <> 0 then begin //====== DRAW NEW PIVOT ========================= ============ nShift = arrVal1[0]; nDir = ret2; nPrc = arrVal1[1]; if nDir > 0 AND nShift < MaxBarsBack then // avoid chart/DLL reload when AutoDetect reloads because of shift Plot3[nShift](nPrc,"PivotHigh"); if nDir < 0 AND nShift < MaxBarsBack then Plot4[nShift](nPrc,"PivotLow"); //====== CHECK IF WE CONSOLIDATED OLD PIVOTS AWAY =========== if AbsValue(nDir) > 1 then begin nShift = arrVal1[4]; nDir = ret2; nPrc = arrVal1[5]; if nDir > 0 AND nPrc > 0 AND nShift < MaxBarsBack then Plot1[nShift](nPrc,"PivotHighOld"); if nDir < 0 AND nPrc > 0 AND nShift < MaxBarsBack then Plot2[nShift](nPrc,"PivotLowOld"); end; end; | ||
| |
|
| | #2 | ||
![]() | Re: Floating Point Exception Error Just a hunch, but at first I would think the exception is coming from the dll and not from the code unless you are possibly not passing in a float as the required float param. That would be my first place to look, but I'm no EL expert.... With kind regards, MK | ||
| |
|
| | #3 | ||
![]() | Re: Floating Point Exception Error | ||
| |
|
![]() |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| TS8 Error | hogarstrasni | General Discussion | 2 | 10-07-2009 06:22 PM |
| Error in MC | emptyvault | Coding Forum | 11 | 08-30-2009 12:55 PM |
| Error Code Help Please | emptyvault | Coding Forum | 10 | 07-19-2009 12:21 PM |
| Error when Retrieving PMs | brownsfan019 | Support Center | 4 | 04-21-2009 11:16 PM |
| Url.dll Error - Help! | brownsfan019 | Tools of the Trade | 5 | 09-16-2008 05:50 PM |