- Search Forex Factory
- 8 Results
- megamixx replied Feb 13, 2014
It isn't someone else's code. I wrote it online. Like I said, I'm a beginner at this. That's why I'm on this page and asked the question in the first place! With that said, thank you very much for your help Rockit. I'll plug this in today. megamixx
- megamixx replied Feb 12, 2014
Sorry, I guess you can't highlight code. Here it is without the highlighted code mistake: #define SIGNAL_NONE 0 #define SIGNAL_BUY 1 #define SIGNAL_SELL 2 #define SIGNAL_CLOSEBUY 3 #define SIGNAL_CLOSESELL 4 #property copyright "x" #property link ...
- megamixx replied Feb 12, 2014
I think the problem is, I don't think I'm actually bar-counting. I think barcount is getting a zero value and closing out the order. I didn't know where exactly to place the barcount = BARCOUNT; and time = Time[0]; when you said I have to place them ...
- megamixx replied Feb 12, 2014
Is this better? Trades are still closing out within a bar and they're closing with the same 2 error types in the journal. static datetime time; int barcount; bool IsTrade = False; if (OrdersTotal() > 0) { IsTrade =true; { if (IsTrade==true && time < ...
- megamixx replied Feb 12, 2014
Sure, thanks for looking at it. I'm getting order close errors 138 and 4051 since I inserted the barcount info. It's triggering very quick closes after the opens. I know I have incorrect code in regards to the new barcount info, but it works ok when ...
- megamixx replied Feb 11, 2014
This is where I'm at (I'm a beginner at best) and so far unsuccessful. extern int BARCOUNT = 72; int barcount; static datetime time; if (time < Time[0]) time = Time[0]; barcount--; if (barcount == 0) Print("Bar count on the 'EURUSD' symbol with ...
- megamixx replied Jan 30, 2014
Thanks, Rockit, I'll try working this into my code
- megamixx replied Jan 29, 2014
I'm looking for something like the original question posted: Does anyone know to code a exit after a certain amount of bars after opening a position... For example, on a hourly chart, close the position after 4 hours or 4 bars have passed regardless ...
- Posts by Member Search: 'megamixx'