|
pieronetto: i'm guessing i'm totaly of totally off track here? res=OrderSelect(SELECT_BY_POS,MODE_TRADES); double A=OrderOpenTime(); int B=iHighest(NULL,0,MODE_HIGH,3,A); if(B) resC=OrderClose(NULL,0.01,Ask,3,clrRed); |
|
int start() { int val; double A,B,index,select,pool; bool res; index=0; select=SELECT_BY_POS; pool=MODE_TRADES; res=OrderSelect(index,select,pool); A=OrderOpenPrice(); B=OrderOpenTime(); val=iHighest(NULL,0,MODE_HIGH,6,0); Comment("Open Time ",B,"\n", "Highest ",val,"\n", "Open Price ",A); return(0); }
Hi again!
Thanks WHroeder for you response, i guess you had a good laugh about it, that's ok, still learning.
I been reading and playing a bit with the code and that what i have for now to learn how it works.
Question is? How do i call back to the opening candle, (NULL,0,MODE_HIGH,6,0), last 0 is allways current candle.
Thanks and have fun with my stupidity. Joking lol
int start() { int val; double A,B,index,select,pool; bool res; select=SELECT_BY_POS; pool=MODE_TRADES; res=OrderSelect(index,select,pool); A=OrderOpenPrice(); B=OrderOpenTime(); val=iHighest(NULL,0,MODE_HIGH,6,0); Comment("Open Time ",B,"\n", "Highest ",val,"\n", "Open Price ",A); return(0); }there was an index=0 in there does not belong there
|
pieronetto: How do i call back to the opening candle, (NULL,0,MODE_HIGH,6,0), last 0 is allways current candle. |
|
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
{ double A; bool res,resC; if(OrdersTotal()>0) res=OrderSelect(SELECT_BY_POS,MODE_TRADES); A=OrderOpenTime(); int B=iHighest(NULL,0,MODE_HIGH,3,A); if(B) if(OP_SELL) resC=OrderClose(NULL,0.01,Ask,3,clrRed); }Hi there!
I'm trying to get the highest 3 from the Opening, i'm guessing i'm totaly of track here?
Thanks for any help.