Forum

How to Get The Lowest Open Lot

Hello. I have a program that opens a position with a higher lot size if there's a position open and it aims to multiply based on the lowest lot size but I'm having trouble getting the lowest lotsize. Please help double getLowestLots(){ double lowestLots = 0 ; for ( int i = 0 ; i < PositionsTotal

System based on pending orders

Hello.So the system I want to make opens two pending orders 1 buy stop and one sell stop. When price reaches to one of the orders and it becomes a market order the EA doesn't open another stop until the position is closed for the day. In a scenario whereby the trade is carried over to the next day

Which is Faster OnTick or OnTimer

Which function would be better suited for a High frequency trading system

How To Filter History Deals Using Position Comment

How do do I filter the History Deals using position comment ?....Please help fix the code int MaxConsecutiveLosses(){ HistorySelect ( 0 , TimeCurrent ()); int max_losses = 0 ; int current_losses = 0 ; // Get the total number of closed trades int total_trades =

History deals

Hello. I want to get the number of consecutive losses from the history but I want to filter the deals by comment" ". So I noticed that the DEAL_ENTRY_IN has different comment from DEAL_ENTRY_OUT . So how do I retrieve the information? Code below int MaxConsecutiveLosses(){ HistorySelect ( 0

How to get the ticket ID for the most negative position?

Hello there! Is there a way to get the ticket ID of the most negative position? Theoretically this would be the first opened position in grid system. I thought storing all position tickets in an array would do but this seems like a mountain of a task. So i thought looping through all open positions

How to prevent overfitting on historical data

Hello, is there a sure to prevent overfitting when testing a system over historical data

Tester stopped because OnInit returns non-zero code 1

Hello. Can someone please help with this error? input group "---- RSI ----" input int RSIPeriod = 14 ; //Period input ENUM_APPLIED_PRICE RSIPrice = PRICE_CLOSE ; //Applied price //--- input group "---- CCI ----" input int