Program Title - N&P Pseudo Code START BLOCK - List of Currency Pairs EURUSD GBPUSD USDJPY USDCHF AUDUSD END BLOCK - List Of Currency Pairs START BLOCK - Configuration Parameters Use 5 minute timeframe for all moving averages Set the value of TopFilterLevel manually on a daily basis for EURUSD Set the value of BottomFilterLevel manually on a daily basis EURUSD Set the value of TopFilterLevel manually on a daily basis for GBPUSD Set the value of BottomFilterLevel manually on a daily basis GBPUSD Set the value of TopFilterLevel manually on a daily basis for USDJPY Set the value of BottomFilterLevel manually on a daily basis USDJPY Set the value of TopFilterLevel manually on a daily basis for USDCHF Set the value of BottomFilterLevel manually on a daily basis USDCHF Set the value of TopFilterLevel manually on a daily basis for AUDUSD Set the value of BottomFilterLevel manually on a daily basis AUDUSD Set Lot size manually for All positions at once (same lot size) **Tim’s question: Would it be possible to use flags/bool to accomplish what Nick want’s to do with FilterLevels and Directions. ***ANS: I read up various things on ‘flags’ but I’m still a bit puzzled on them. They can be used to ‘deactivate’ parts of code (from what I understood). FilterLevels don’t apply always, so it will be common that, lets say EURUSD has a bottom filter level but not a top one on a particular day. Plus these will change daily. I don’t see how flags can make it easier for us than just to write the exact price level. Please let me know. But I can see how flags can be used instead of my old idea of ‘//’ code deactivation. Maybe we can do this with flags: EURUSD Set BuyFlag (either true/false) EURUSD Set SellFlag (true/false) GBPUSD Set BuyFlag (t/f) GBPUSD Set SellFlag (t/f) USDJPY Set BuyFlag (t/f) USDJPY Set SellFlag (t/f) USDCHF Set BuyFlag (t/f) USDCHF Set SellFlag (t/f) AUDUSD Set BuyFlag (t/f) AUDUSD Set SellFlag (t/f) **what do you think Tim, this way I can just set either true or false for the condition at the beginning of the day and then the code would check for this when executing the trade. I thought about it and we can’t combine these flags with Top/BotFilter Levels, because there will be situations (often) when BuyFlag would be True but there will be no Top/Bot Level Filter set. Also typically I will adjust the Top/Bot Filter levels daily. Unless we can use the ‘flag’ system somehow to deactivate a filter (although I can always set an extreme level for it instead of just not using it, i.e. a level that I know won’t be reached by the currency). END BLOCK - Configuration Parameters -------------------------------START BLOCK - Entry Rules----------------- If the 7 Period Exponential Moving Average is greater than the 14 Period Exponential Moving Average AND the 14 Period Exponential Moving Average is greater than the 50 period Simple Moving Average AND Current Price is less than TopFilterLevel THEN Signal a BUY (Long) entry condition If the 7 Period Exponential Moving Average is less than 14 Period Exponential Moving Average AND the 14 Period Exponential Moving Average is less than the 50 period Simple Moving Average AND Current Price is less than BottomFilterLevel THEN Signal a SELL (Short) entry condition *** Question *** What time periods do you want to use for your moving averages? Are the periods Minutes, Hours, Days, Weeks, Months or do they need to be variable? ***Answer *** Excellent question. It will be 5 minute periods for all moving averages, they do not need to be variable. --------------------------------END BLOCK - Entry Rules-------------------- --------------------------START BLOCK - Exit Rules------------------------ If any Open Position is greater than or equal to 20 pips from the entry level THEN Close the Position (we will put this into the OrderSend END BLOCK - Exit Rules START BLOCK - Main - This block controls the whole flow of the program With each Currency Pair in the List of Currency Pairs block do all of the following Check the Flags to see which currencies we are allowed to Buy or SELL Check the Entry Rules block to see if a BUY or SELL condition exists for the allowed Currency Pairs Check to see if there is already an open BUY position for this Currency Pair Check to see if there is already an open SELL position for this Currency Pair If there is no open BUY position for this currency pair AND a Buy condition exixts for this currency pair AND the BuyFlag is set true for this currency pair THEN Open a BUY Position for this currency pair Size: Pre-determined Lots If there is no open SELL position for this currency pair AND a SELL condition exixts for this currency pair AND a SellFlag is true for this currency pair THEN Open a SELL Position for this currency pair Size predetermined lots. END BLOCK - Main Ps: please do feel free to add me on skype/icq, nikolai.lou/376702167 *** Tim’s Q: What information do you need to place an order? int OrderSend( string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment=NULL, int magic=0, datetime expiration=0, color arrow_color=CLR_NONE) Symbol: We will specify this dependent on the pair Cmd: operation, eg: ‘buy’ Volume: this will call ‘Lots’ Price: Ask/Sell Slippage: I don’t think we need any because even if the price jumps it is still likely to be under same conditions and if it’s not then we don’t want to enter anyway. What do you think? StopLoss: None. Take Profit: 20pips String Comment: I don’t really get what this is for. Magic Number: I think this is to label trades, I get a feel we could use this but don’t know how. Datetime: none Colour: buy = green arrow, sell = red arrow.