⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

matrixfx
-
Posts
20 -
Joined
-
Last visited
Reputation Activity
-
matrixfx got a reaction from soundfx in Elasticity indicator
soundfx,
It should signal with lime led when we have elasticity (price change is higher then volume change; indi is >1) and magenta when we have inelasticity in the market. This may be a filter for entries and exits. Elasticity it is used in micro-economy to compare the price change from demand/supply, and also I saw some ideas using it in stock market, but I didn't find any indi on the market. The formula should be OK. The MAPeriod should be tested which one fits better.
bgrtz,
It didn't return the values and I have no leds open when it is launched.
Thanks for replies. Rgds,
-
matrixfx reacted to bgrtz in Elasticity indicator
I simplify the code. Modify to suit your needs, then share your final result with others here with more comprehensive description (what this do, how to use, or, if any, the relation to other indi's)
#property indicator_separate_window #property indicator_buffers 6 #property indicator_color1 Blue #property indicator_width1 3 #property indicator_color2 Red #property indicator_width2 3 #property indicator_color3 Yellow #property indicator_width3 3 #property indicator_minimum 0 #property indicator_maximum 2 extern int MA_Period = 14; extern int MA_Method = 0; extern int MA_Price = 6; string shortName = "Elasticity"; double buffer1[]; double buffer2[]; double buffer3[]; double valMA[]; double valVol[]; double valVolMA[]; int init() { SetIndexBuffer(0, buffer1); SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 1); SetIndexLabel(0, "Elasticity"); SetIndexBuffer(1, buffer2); SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 1); SetIndexLabel(1, "Inelasticity"); SetIndexBuffer(2, buffer3); SetIndexStyle(2, DRAW_LINE, STYLE_SOLID, 1); SetIndexLabel(2, "Idle"); SetIndexBuffer(3, valMA); SetIndexStyle(3, DRAW_NONE); SetIndexBuffer(4, valVol); SetIndexStyle(4, DRAW_NONE); SetIndexBuffer(5, valVolMA); SetIndexStyle(5, DRAW_NONE); IndicatorShortName(shortName); return(0); } int start() { int limit = 1500; for (int i=0; i<=limit; i++) { valMA[i] = iMA(Symbol(), 0, MA_Period, 0, MA_Method, MA_Price, i); valVol[i] = iVolume(Symbol(), 0, i); valVolMA[i] = iMAOnArray(valVol, 0, MA_Period, 0, MODE_SMA, i); if (((valVolMA[i] - valVolMA[i+1]) / valVolMA[i+1]) / ((valMA[i] - valMA[i+1]) / valMA[i+1]) > 1) { buffer1[i] = 1; buffer2[i] = EMPTY_VALUE; buffer3[i] = EMPTY_VALUE; } else if (((valVolMA[i] - valVolMA[i+1]) / valVolMA[i+1]) / ((valMA[i] - valMA[i+1]) / valMA[i+1]) < 1) { buffer1[i] = EMPTY_VALUE; buffer2[i] = 1; buffer3[i] = EMPTY_VALUE; } else { buffer1[i] = EMPTY_VALUE; buffer2[i] = EMPTY_VALUE; buffer3[i] = 1; } } return(0); }
http://img857.imageshack.us/img857/7340/elasticity.png
Blue line is "elasticity", red is "inelasticity"
Regards
-
matrixfx reacted to bgrtz in ArrayMaximum integration - help needed
1. Your Vol is not an array, so
2. mv always return false, which is -1
3. When you use mv as multiplication factor, the formula mv*((V1+100)/100) always give negative results
4. Since V_1_0 is iVolume, so it always give positive results
5. Final result, formula V_1_0 > (mv*((V1+100)/100) will compare "is [any positive value] bigger than [any negative value]". Of course the answer always TRUE
6. It will pass the other condition (the else part). You will only see Lime bars
NB.
1. The mv is the index of array, not the value. So I believe you should use something like Vol[mv]
2. I just read the code, did not have time to try it yet. Sorry if I was mistaken, just trying to help
Regards
-
matrixfx reacted to debabs in Elemental Trader
Hey Fellows:
You can download all what it take here -
Here is full of the latest StraddleTrader.
http://d2gpfu3v8xkvji.cloudfront.net/ET/StraddleTraderSetup_03_03_11.exe
Here is the harmonic blue print.
http://d2gpfu3v8xkvji.cloudfront.net/ET/blueprint.pdf
Remember to say THANKS