mattehalen:
Primery trigger: If cangle < iBands go to next trigger
secondary trigger: If the CCI is between -170 & -120 Trigger alarm (Buy)
#define OP_NONE 0 static int primary = OP_NONE; if (candle < ibandLower) primary = OP_BUY; // Remember else (candle > ibandUpper) primary = OP_SELL; if(primary == OP_Buy && -170 < CCI && CCI < -120){ primary = OP_NONE; DoBuy(); }
WHRoeder:
Thank you for the code.
I did get that part to work.
if (candle<BBLow){ //primery if( //sekendary CCI<buyFilter1.lowerLimit && CCI>buyFilter1.upperLimit && CCIDelay<CCI ) { ObjectCreate("line"+objcount,OBJ_VLINE,0,Time[0],0,0,0); ObjectSet("line"+objcount,OBJPROP_COLOR,Green); Alert("BUY"); return; } //END sekendary } //END primery
But i still dont get the alarm to play only once.
if (candle<BBLow){ //primery if( //sekendary CCI<buyFilter1.lowerLimit && CCI>buyFilter1.upperLimitThat code means they must BOTH be true at the same time (in the SAME candle) That's not what you asked for and not what I give you.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi there. I've some problem that I know some one on this forum can help me with.
I have a idé and some code to set an alarm.
Primery trigger:
If cangle < iBands go to next trigger
secondary trigger: If the CCI is between -170 & -120 Trigger alarm (Buy)
First of all i dont know how to make the secondary trigger trigger after the first one if that one is true.
I to get them all to work but only if all of them are on the same candle.
And also my alarm is not trigged once but when everything is TRUE it keeps trigger the alrm until its FALSE.
but first problem first:
I do get the candle to trigger everything right but the CCIDelay i don't get to be trigged on the sekendary trigger.
-------------------------------------------------------------------------------------------------------
Update:
i change the code to this and the only thing know is to have the alarm only playing once. how do i do that?