ChatCrawlersearch across public Telegram Open the app
P

Python 中文交流群

snapshot for October 2024
October 2024 ×
31 October 2024
家人们,Python小白,现在已经看完基础知识了,请问下一步是应该去刷力扣题,还是需要找项目练练手呀,感觉学的有点迷茫,请大佬们解惑🙏
#include <Trade/Trade.mqh> // Initialize trading class CTrade trade; // Input parameters for moving averages input int fastLength = 10; // Fast MA period input int slowLength = 20; // Slow MA period // Input parameters for position management input double tp1Percent = 2.0; // Take Profit 1 (% from entry price) input double tp2Percent = 4.0; // Take Profit 2 (% from entry price) input double tp3Percent = 6.0; // Take Profit 3 (% from entry price) input double initialStopLossPercent = 2.0; // Initial Stop-Loss (% from entry price) input double trailingStopPercent = 3.0; // Trailing Stop (% from current price) input double positionSize = 0.1; // Position size in lots // Global variables double fastMA[], slowMA[]; double entryPrice, currentStopLoss; double tp1Price, tp2Price, tp3Price; bool trailingStopActive = false; // Indicator handles int fastMAHandle; int slowMAHandle; // Initialization function int OnInit() { // Create handles for moving averages fastMAHandle = iMA(_Symbol, PERIOD_CURRENT, fastLength, 0, MODE_EMA, PRICE_CLOSE); slowMAHandle = iMA(_Symbol, PERIOD_CURRENT, slowLength, 0, MODE_EMA, PRICE_CLOSE); if (fastMAHandle == INVALID_HANDLE || slowMAHandle == INVALID_HANDLE) { Print("Failed to get indicator handles."); return INIT_FAILED; } return INIT_SUCCEEDED; } // OnTick function - main strategy logic void OnTick() { // Copy moving average values into the arrays if (CopyBuffer(fastMAHandle, 0, 0, 1, fastMA) <= 0 || CopyBuffer(slowMAHandle, 0, 0, 1, slowMA) <= 0) { Print("Failed to copy buffer data."); return; } // Retrieve the current position double currentPositionSize = PositionGetDouble(POSITION_VOLUME); int positionType = (currentPositionSize > 0) ? POSITION_TYPE_BUY : (currentPositionSize < 0) ? POSITION_TYPE_SELL : -1; // Long condition: Fast MA crosses above Slow MA if (fastMA[0] > slowMA[0] && positionType !=
R
else if (currentPositionSize < 0) // Short position { double newStopLoss = SymbolInfoDouble(_Symbol, SYMBOL_ASK) * (1 + trailingStopPercent / 100); if (newStopLoss < currentStopLoss) { currentStopLoss = newStopLoss; trade.PositionModify(_Symbol, currentStopLoss, 0); } } } // Deinitialization function void OnDeinit(const int reason) { // Release indicator handles IndicatorRelease(fastMAHandle); IndicatorRelease(slowMAHandle); } 🚀
S
能练手的多了去了
不过现在才刚入门
看书看的很迷茫😢
Z
理论学明白了先
然后在B站找的网课
感觉还是要真正动手,不知道是去刷力扣还是找个项目搞一下
A
现在机器学习岗位不怎么考代码的 更多的还是模型方面 想找工作还得定位好找什么工作
算法工程师吧,但感觉目标有点遥远,目前先希望能有独立开发项目的能力😂
A
开发和算法是两个方向的 不是学了python就能做算法的 所以说让你先定位好
Open in Telegram Каталог площадок Искать в ChatCrawler

A snapshot of an open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog